Functions for working with addressbook.
Usage: #include <swilib.h> or #include <swilib/addressbook.h>
|
| int | OpenNativeAddressbook (int type, int unk1, int unk2, NativeAbData *data) |
| | Open native address book.
|
| |
| NativeAbData * | AllocNativeAbData (void) |
| | Allocate native addressbook data.
|
| |
| int | FreeNativeAbData (NativeAbData *data) |
| | Free allocated native addressbook data.
|
| |
| int | GetFilledNAbDataCount (NativeAbData *data) |
| | Get count of the items in NativeAbData.
|
| |
| PKT_NUM * | GetDataFromNAbData (NativeAbData *data, int index) |
| | Get item data from the NativeAbData by index.
|
| |
| int | GetNativeAbDataStatus (NativeAbData *data, int index) |
| | Get item status from the NativeAbData by index.
|
| |
| int | GetNativeAbDataType (NativeAbData *data, int index) |
| | Get item type from the NativeAbData by index.
|
| |
| WSHDR * | GetNumFromNativeAbData (NativeAbData *data, int type, int index) |
| | Get number from the NativeAbData.
|
| |
| int | SetNumToNativeAbData (NativeAbData *data, int type, const WSHDR *num) |
| | Set number to the NativeAbData.
|
| |
| void | UnpackNumPkt (const PKT_NUM *pkt, char *buf, int maxlen) |
| | Decode PKT_NUM for the phone number.
|
| |
◆ AB_UNPRES_ITEM
◆ AB_UNPRES
◆ PKT_NUM
◆ AbNumList
◆ NativeAbData
◆ NativeAbData
| typedef struct NativeAbData NativeAbData |
◆ AbNumList
| typedef struct AbNumList AbNumList |
◆ PKT_NUM
| typedef struct PKT_NUM PKT_NUM |
◆ AB_UNPRES
| typedef struct AB_UNPRES AB_UNPRES |
◆ AB_UNPRES_ITEM
| typedef struct AB_UNPRES_ITEM AB_UNPRES_ITEM |
◆ OpenNativeAddressbook()
| int OpenNativeAddressbook |
( |
int | type, |
|
|
int | unk1, |
|
|
int | unk2, |
|
|
NativeAbData * | data ) |
Open native address book.
- Parameters
-
| type | type of address-book UI |
| unk1 | unknown |
| unk2 | unknown |
| data | pointer to the NativeAbData or NULL |
- Returns
- CSM ID
◆ AllocNativeAbData()
Allocate native addressbook data.
- Returns
- pointer to the allocated data
◆ FreeNativeAbData()
Free allocated native addressbook data.
- Parameters
-
| data | pointer to the allocated data |
- Returns
- 1: success, 0: error
◆ GetFilledNAbDataCount()
Get count of the items in NativeAbData.
- Parameters
-
| data | pointer to the native addressbook data |
- Returns
- count
◆ GetDataFromNAbData()
Get item data from the NativeAbData by index.
- Parameters
-
| data | pointer to the native addressbook data |
| index | index of the item |
- Returns
- pointer to the PKT_NUM
◆ GetNativeAbDataStatus()
| int GetNativeAbDataStatus |
( |
NativeAbData * | data, |
|
|
int | index ) |
Get item status from the NativeAbData by index.
- Parameters
-
| data | pointer to the native addressbook data |
| index | index of the item |
- Returns
- item status
◆ GetNativeAbDataType()
Get item type from the NativeAbData by index.
- Parameters
-
| data | pointer to the native addressbook data |
| index | index of the item |
- Returns
- item type
◆ GetNumFromNativeAbData()
Get number from the NativeAbData.
- Parameters
-
| data | pointer to the native addressbook data |
| type | item type |
| index | zero-based item index |
- Returns
- newly allocated string, or NULL if the item was not found; free with FreeWS
◆ SetNumToNativeAbData()
Set number to the NativeAbData.
- Parameters
-
| data | pointer to the native addressbook data |
| type | item type |
| num | phone number |
- Returns
- 1: success, 0: error
◆ UnpackNumPkt()
| void UnpackNumPkt |
( |
const PKT_NUM * | pkt, |
|
|
char * | buf, |
|
|
int | maxlen ) |
Decode PKT_NUM for the phone number.
- Parameters
-
| pkt | pointer to the PKT_NUM |
| [out] | buf | output buffer for the phone number |
| maxlen | maximum size of output buffer |
◆ UnpackABentry()
| int UnpackABentry |
( |
AB_UNPRES * | entry, |
|
|
const void * | data, |
|
|
int | size, |
|
|
int | flags ) |
Unpack entry.
- Parameters
-
| [out] | entry | unpacked entry |
| data | encoded entry data |
| size | size of the entry data |
| flags | unknown flags |
- Returns
- 0 or error
◆ FreeUnpackABentry()
| int FreeUnpackABentry |
( |
AB_UNPRES * | entry, |
|
|
void * | mfree_fn ) |
Free unpacked entry.
- Parameters
-
- Returns
- 0 or error
◆ GetTypeOfAB_UNPRES_ITEM()
| int GetTypeOfAB_UNPRES_ITEM |
( |
int | item_type | ) |
|
Convert AB_UNPRES.item_type to the NativeAbData item type.
- Parameters
-
- Returns
- converted type