| CE Gobi SDK 2.7 GobiApi

- Main Page
- Modules
- Classes
- Files

- File List

GobiPBMgmtAPI.h
1 /*===========================================================================
2 FILE:
3 GobiPbMgmtAPI.h
4
5 DESCRIPTION:
6 Gobi Phonebook Management APIs
7
8 Copyright (C) 2014 Sierra Wireless Incorporated. All rights reserved.
9 Sierra Wireless Proprietary/GTDR
10 ==========================================================================*/
11
12 #ifndef GobiPbMgmtAPI_H
13 #define GobiPbMgmtAPI_H
14 /*=========================================================================*/
15 // Definitions
16 /*=========================================================================*/
17 #ifdef GOBIAPI_EXPORTS
18 #define IMPORTGOBI extern "C" __declspec( dllexport )
19 #else //GOBIAPI_EXPORTS
20 #ifdef __cplusplus
21 /* C++ callable DLL */
22 #define IMPORTGOBI extern "C" __declspec( dllimport )
23 #else
24 /* C callable DLL */
25 #define IMPORTGOBI __declspec( dllimport )
26 #endif
27 #endif //GOBIAPI_EXPORTS
28
29 // Calling convention for API
30 #define GOBICALLBACK __stdcall
31 #define GOBICMAPI __stdcall
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
41
42 /*=========================================================================*/
43 // Structs
44 /*=========================================================================*/
45 #define MAX_PB_NO_LEN 81
46 #define MAX_NO_OF_PB 10
47 #define MAX_PB_DESCRIPTION_LENGTH 255
48
49 typedef struct
50 {
51 WORD recordID;
52 BYTE numType;
53 BYTE numPlan;
54 BYTE numLen;
55 BYTE number[MAX_PB_DESCRIPTION_LENGTH];
56 BYTE nameLen;
57 BYTE name[MAX_PB_DESCRIPTION_LENGTH];
58 } phonebookEntry;
59
60 //emergencyNumberEntry
61 typedef struct
62 {
63 BYTE emergencyNumberType;
64 BYTE sessionTypeValid;
65 BYTE sessionType;
66 BYTE categoryValid;
67 BYTE category;
68 BYTE numLen;
69 BYTE number[MAX_PB_NO_LEN];
70 } emergencyNumberEntry;
71
84 typedef struct
85 {
86 BYTE numInstances;
87 phonebookEntry phoneInfo[MAX_NO_OF_PB];
88 } arrPBInfo;
89
90 /*=========================================================================*/
91 // Callbacks
92 /*=========================================================================*/
93 // Phonebook Record Read callback function
94 typedef void (GOBICALLBACK * tFNPbRecordRead)(
95 BYTE sessionType,
96 WORD pbType,
97 arrPBInfo* phoneBookEntry );
98
99 // Phonebook Ready callback function
100 typedef void (GOBICALLBACK * tFNAllPbInitDone)(
101 BYTE noOfInstance,
102 BYTE* arrSessionType,
103 WORD* arrPbBitMask);
104
105 //Phonebook Emergency List callback function
106 typedef void (GOBICALLBACK * tFNEmergencyList)(
107 BYTE noOfInstance,
108 emergencyNumberEntry* arrEmergencyNumberEntry);
109
110 #ifdef __cplusplus
111 };
112 #endif
113
114 /*=========================================================================*/
115 // Prototypes
116 /*=========================================================================*/
165 IMPORTGOBI ULONG GOBICMAPI GetPhonebookCapabilities(
166 BYTE* pSessionType,
167 WORD* pPbType,
168 WORD* pUsedRecords,
169 WORD* pMaxRecords,
170 BYTE* pMaxNumLen,
171 BYTE* pMaxNameLen
172 );
173
219 IMPORTGOBI ULONG GOBICMAPI ReadPhonebookRecords(
220 BYTE* pSessionType,
221 WORD* pPbType,
222 WORD* pStartId,
223 WORD* pEndId,
224 WORD* pNumOfRecords
225 );
226
298 IMPORTGOBI ULONG GOBICMAPI WritePhonebookRecord(
299 BYTE* pSessionType,
300 WORD* pPbType,
301 WORD* pRecordId,
302 BYTE* pNumType,
303 BYTE* pNumPlan,
304 BYTE* pNumLen,
305 BYTE* pArrNum,
306 BYTE* pNameLen,
307 BYTE* pArrName
308 );
309
352 IMPORTGOBI ULONG GOBICMAPI DeletePhonebookRecord(
353 BYTE* pSessionType,
354 WORD* pPbType,
355 WORD* pRecordId
356 );
357
368 IMPORTGOBI ULONG GOBICMAPI SetEmergencyListCallback(
369 tFNEmergencyList pCallback);
370
381 IMPORTGOBI ULONG GOBICMAPI SetAllPhonebookInitDoneCallback(
382 tFNAllPbInitDone pCallback);
383 // End of PBM group
385
386 #endif //GobiPbMgmtAPI_H
GetPhonebookCapabilities
IMPORTGOBI ULONG GOBICMAPI GetPhonebookCapabilities(BYTE *pSessionType, WORD *pPbType, WORD *pUsedRecords, WORD *pMaxRecords, BYTE *pMaxNumLen, BYTE *pMaxNameLen)
phonebookEntry
Definition: GobiPBMgmtAPI.h:49
SetAllPhonebookInitDoneCallback
IMPORTGOBI ULONG GOBICMAPI SetAllPhonebookInitDoneCallback(tFNAllPbInitDone pCallback)
emergencyNumberEntry
Definition: GobiPBMgmtAPI.h:61
WritePhonebookRecord
IMPORTGOBI ULONG GOBICMAPI WritePhonebookRecord(BYTE *pSessionType, WORD *pPbType, WORD *pRecordId, BYTE *pNumType, BYTE *pNumPlan, BYTE *pNumLen, BYTE *pArrNum, BYTE *pNameLen, BYTE *pArrName)
SetEmergencyListCallback
IMPORTGOBI ULONG GOBICMAPI SetEmergencyListCallback(tFNEmergencyList pCallback)
arrPBInfo
Definition: GobiPBMgmtAPI.h:84
DeletePhonebookRecord
IMPORTGOBI ULONG GOBICMAPI DeletePhonebookRecord(BYTE *pSessionType, WORD *pPbType, WORD *pRecordId)
ReadPhonebookRecords
IMPORTGOBI ULONG GOBICMAPI ReadPhonebookRecords(BYTE *pSessionType, WORD *pPbType, WORD *pStartId, WORD *pEndId, WORD *pNumOfRecords)