|
API Guide Home (Online version only) |
![]() |
00001 /****************************************************************************** 00002 * Copyright (c) 2004 palmOne, Inc. or its subsidiaries. 00003 * All rights reserved. 00004 *****************************************************************************/ 00005 /** 00006 * @defgroup Carrier Carrier Customization Library 00007 * 00008 * @{ 00009 * @} 00010 */ 00011 00012 /** 00013 * @file CarrierCustomLib.h 00014 * @version 1.0 00015 * @date 12/01/2002 00016 * 00017 * @brief This is the main header file for the Carrier Customization 00018 * Library. 00019 * 00020 * This includes all the other required headers, so there is no need 00021 * to include Traps, Errors, and Types if this is included. 00022 * 00023 * Usage Model: 00024 * 00025 * This library is automatically loaded at boot time by HsExtensions. 00026 * Apps that call this library should only have to call 00027 * SysLibFind. They should never have to load the library. 00028 * LibOpen and LibClose should not be called either. 00029 * 00030 */ 00031 00032 /* 00033 * @author dla 00034 * 00035 * $Id: //depot/Components/Libraries/PmCarrierCustomizationLib/1.2C/Incs/IncsPublic/68K/Libraries/PmCarrierCustomizationLib/CarrierCustomLib.h#1 $ 00036 * 00037 */ 00038 00039 #ifndef __CARRIER_CUSTOMIZATION_LIBRARY_H__ 00040 #define __CARRIER_CUSTOMIZATION_LIBRARY_H__ 00041 00042 00043 #include <CarrierCustomLibTraps.h> 00044 #include <CarrierCustomLibErr.h> 00045 #include <CarrierCustomLibTypes.h> 00046 00047 #define ENCRYPTED_DATABASE true /**< internal */ 00048 00049 #define MVNONAME_LENGTH 10 /* length for MVNO name stored in carrier DB*/ 00050 00051 #ifdef BUILDING_CARRIER_CUSTOMIZATION_PREF_LIB_DISPATCH_TABLE 00052 #define CCUSTOM_LIB_TRAP(trapNum) 00053 #else 00054 #define CCUSTOM_LIB_TRAP(trapNum) SYS_TRAP(trapNum) 00055 #endif 00056 00057 #if 0 00058 #pragma mark -------- Constants -------- 00059 #endif 00060 00061 #if 0 00062 #pragma mark -------- Structs -------- 00063 #endif 00064 00065 00066 #if 0 00067 #pragma mark -------- Exported Globals -------- 00068 #endif 00069 00070 00071 #if 0 00072 #pragma mark -------- Exported Functions -------- 00073 #endif 00074 00075 00076 #ifdef __cplusplus 00077 extern "C" { 00078 #endif 00079 00080 /** 00081 * Open the library, initialize library globals 00082 * Initializes the library globals, based on the last known carrier. 00083 * This should never be called by an application, as it is automatically 00084 * loaded by the system and opened. 00085 * 00086 * @param refNum: IN: CCustomLib reference number (from SysLibFind 00087 * or SysLibLoad) 00088 * 00089 * @retval Err Error Code. 00090 */ 00091 extern Err 00092 CCustomLibOpen(UInt16 refNum) 00093 CCUSTOM_LIB_TRAP(sysLibTrapOpen); 00094 00095 00096 /** 00097 * Closes library and frees up allocated resources 00098 * Close the library and decrements the reference count. 00099 * This should never be called by an application. 00100 * 00101 * @param refNum: IN: CCustomLib reference number (from SysLibFind 00102 * or SysLibLoad) 00103 * 00104 * @retval Err Error Code. 00105 */ 00106 extern Err 00107 CCustomLibClose(UInt16 refNum) 00108 CCUSTOM_LIB_TRAP(sysLibTrapClose); 00109 00110 00111 /** 00112 * Standard library sleep routine 00113 * 00114 * @param refNum: IN: CCustomLib reference number (from SysLibFind 00115 * or SysLibLoad) 00116 * 00117 * @retval Err Error code. 00118 */ 00119 extern Err 00120 CCustomLibSleep(UInt16 refNum) 00121 CCUSTOM_LIB_TRAP(sysLibTrapSleep); 00122 00123 00124 /** 00125 * Standard library wake routine 00126 * 00127 * @param refNum: IN: CCustomLib reference number (from SysLibFind 00128 * or SysLibLoad) 00129 * 00130 * @retval Err Error code. 00131 */ 00132 extern Err 00133 CCustomLibWake(UInt16 refNum) 00134 CCUSTOM_LIB_TRAP(sysLibTrapWake); 00135 00136 00137 /** Get Library API Version number. 00138 * 00139 * @param refNum: IN: Library reference number 00140 * @param majorVerP: OUT: Major version number 00141 * @param minorVerP: OUT: Minor version number 00142 * @param bugFixVerP: OUT: Bug fix version number 00143 * @retval Err Customization Library error code 00144 */ 00145 extern Err 00146 CCustomLibVersionGet(UInt16 refNum, UInt32* majorVerP, UInt32* minorVerP, UInt32* bugFixVerP) 00147 CCUSTOM_LIB_TRAP(CCustomLibTrapVersionGet); 00148 00149 00150 /** 00151 * Returns the specified setting. 00152 * Returns the carrier settings for the given field. 00153 * Any memory allocation must be freed by the calling application. 00154 * Currently, only string types are allocated. 00155 * 00156 * @param refNum: IN: CCustomLib reference number (from SysLibFind 00157 * or SysLibLoad) 00158 * @param settingsType: IN: object type specified by settingsTypeEnum 00159 * @param dataP: IN,OUT: allocated object containing data, undefined on err 00160 * 00161 * @retval Err Error code. 00162 */ 00163 extern Err 00164 CCustomLibGetCarrierSetting(UInt16 refNum, CCSMSettingsType settingsType, void *dataP) 00165 CCUSTOM_LIB_TRAP(CCustomLibTrapGetCarrierSetting); 00166 00167 00168 /** 00169 * Returns the carrier ID from the SIM. 00170 * Makes a copy of MMC/MNC code and returns it. 00171 * 00172 * @param refNum: IN: CCustomLib reference number (from SysLibFind 00173 * or SysLibLoad) 00174 * @param length: IN,OUT: length of buffer passed in, length of buffer 00175 * used/needed (not including terminator) 00176 * @param dataP: OUT: pointer to store the value 00177 * @retval Err Error code. 00178 */ 00179 extern Err 00180 CCustomLibGetCarrierCode(UInt16 refNum, UInt8 *length, char **dataP) 00181 CCUSTOM_LIB_TRAP(CCustomLibTrapGetCarrierCode); 00182 00183 00184 /** 00185 * Returns the actual length of the carrier ID. 00186 * If no carrier code is passed it, returns the length of the current carrier ID. 00187 * This length is usually 6 for North American countries and 5 for others. 00188 * 00189 * @param refNum: IN: CCustomLib reference number (from SysLibFind 00190 * or SysLibLoad) 00191 * @param lengthP: IN,OUT: length of carrier code. 00192 * Uses the current carrier if no carrier code is passed in 00193 * @param carrierCodeP: IN: optional carrier code 00194 * @retval Err Error code. 00195 */ 00196 extern Err 00197 CCustomLibGetCarrierCodeLength(UInt16 refNum, UInt8 *lengthP, char *carrierCodeP) 00198 CCUSTOM_LIB_TRAP(CCustomLibTrapGetCarrierCodeLength); 00199 00200 00201 #ifdef __cplusplus 00202 } 00203 #endif 00204 00205 00206 #endif // __CARRIER_CUSTOMIZATION_LIBRARY_H__
| Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:52 2008 for Palm API Guide |