00001 // vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c: 00002 /* 00003 * Copyright (C) 2005 Dell Inc. 00004 * by Michael Brown <Michael_E_Brown@dell.com> 00005 * Licensed under the Open Software License version 2.1 00006 * 00007 * Alternatively, you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published 00009 * by the Free Software Foundation; either version 2 of the License, 00010 * or (at your option) any later version. 00011 00012 * This program is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00015 * See the GNU General Public License for more details. 00016 */ 00017 00018 00019 #ifndef C_TOKEN_H 00020 #define C_TOKEN_H 00021 00022 // include smbios_c/compat.h first 00023 #include "smbios_c/compat.h" 00024 #include "smbios_c/types.h" 00025 00026 EXTERN_C_BEGIN; 00027 00028 #define TOKEN_TYPE_D4 0xD4 00029 #define TOKEN_TYPE_D5 0xD5 00030 #define TOKEN_TYPE_D6 0xD6 00031 #define TOKEN_TYPE_DA 0xDA 00032 00037 const char * DLL_SPEC token_strerror(); 00038 00043 int DLL_SPEC token_get_type(u16 id); 00044 00048 bool DLL_SPEC token_is_bool(u16 id); 00049 00053 int DLL_SPEC token_is_active(u16 id); 00054 00058 int DLL_SPEC token_activate(u16 id); 00059 00063 bool DLL_SPEC token_is_string(u16 id); 00064 00074 char * DLL_SPEC token_get_string(u16 id, size_t *len); 00075 00082 int DLL_SPEC token_set_string(u16 id, const char *value, size_t size); 00083 00088 void DLL_SPEC token_string_free(char *); 00089 00092 const struct smbios_struct * DLL_SPEC token_get_smbios_struct(u16 id); 00093 00096 const void * DLL_SPEC token_get_ptr(u16 id); 00097 00100 DLL_SPEC int token_try_password(u16 id, const char *pass_ascii, const char *pass_scancode); 00101 00102 00103 EXTERN_C_END; 00104 00105 #endif /* TOKEN_H */