SWILIB API (NSG)    
Loading...
Searching...
No Matches
addressbook.h
Go to the documentation of this file.
1#pragma once
2
3#ifndef __IN_SWILIB__
4#include "base.h"
5#include "wstring.h"
6#endif
7
9
19typedef struct AbNumList AbNumList;
20typedef struct PKT_NUM PKT_NUM;
21typedef struct AB_UNPRES AB_UNPRES;
23
28#ifdef NEWSGOLD
29 short field_0;
30 char no_data;
33 void *data;
34#else
35 char field_0;
36 char no_data;
37 char field_2;
38 char item_type;
39 int field_4;
40 void *data;
41#endif
42};
43
47struct AB_UNPRES {
48#ifdef NEWSGOLD
49 short NrOfFlds;
52 short field_6;
53 short NrJ;
54 char field_A;
55 char field_B;
57 char EntTp;
59 short EntId;
62#else
63 short field_0;
64 short field_2;
65 short field_4;
67 short field_8;
68 short field_A;
70 char field_10;
71 char field_11;
72 short field_12;
73 int field_14;
74 int field_18;
75#endif
76};
77
81#pragma pack(1)
82struct PKT_NUM {
83 char _1D;
84 char format;
85 char data_size;
86 char _0_1;
87 char _0_2;
88// char _0_3;
89 char data[128];
90};
91#pragma pack()
92
96struct AbNumList {
97 void *next;
98 void *prev;
100 void *data;
101};
102
112
121__swi_begin(0x2B9)
122int OpenNativeAddressbook(int type, int unk1, int unk2, NativeAbData *data)
123__swi_end(0x2B9, OpenNativeAddressbook, (type, unk1, unk2, data));
124
129__swi_begin(0x2B3)
131__swi_end(0x2B3, AllocNativeAbData, ());
132
138__swi_begin(0x2B4)
140__swi_end(0x2B4, FreeNativeAbData, (data));
141
147__swi_begin(0x2D3)
149__swi_end(0x2D3, GetFilledNAbDataCount, (data));
150
157__swi_begin(0x2D4)
159__swi_end(0x2D4, GetDataFromNAbData, (data, index));
160
167__swi_begin(0x2B7)
169__swi_end(0x2B7, GetNativeAbDataStatus, (data, index));
170
177__swi_begin(0x2B5)
179__swi_end(0x2B5, GetNativeAbDataType, (data, index));
180
188__swi_begin(0x2B6)
189WSHDR *GetNumFromNativeAbData(NativeAbData *data, int type, int index)
190__swi_end(0x2B6, GetNumFromNativeAbData, (data, type, index));
191
199__swi_begin(0x2B8)
201__swi_end(0x2B8, SetNumToNativeAbData, (data, type, num));
202
209__swi_begin(0x2D5)
210void UnpackNumPkt(const PKT_NUM *pkt, char *buf, int maxlen)
211__swi_end(0x2D5, UnpackNumPkt, (pkt, buf, maxlen));
212
226__swi_begin(0x16D)
227int UnpackABentry(AB_UNPRES *entry, const void *data, int size, int flags)
228__swi_end(0x16D, UnpackABentry, (entry, data, size, flags));
229
236__swi_begin(0x16E)
237int FreeUnpackABentry(AB_UNPRES *entry, void *mfree_fn)
238__swi_end(0x16E, FreeUnpackABentry, (entry, mfree_fn));
239
245__swi_begin(0x16F)
246int GetTypeOfAB_UNPRES_ITEM(int item_type)
247__swi_end(0x16F, GetTypeOfAB_UNPRES_ITEM, (item_type));
248
252
#define __swilib_begin
Definition doxygen.h:29
#define __swi_end(number, func, call)
Definition doxygen.h:33
#define __swi_begin(number)
Definition doxygen.h:32
#define __swilib_end
Definition doxygen.h:30
void * mfree_adr
Pointer to the free()
void * next
Pointer to the next item.
Definition addressbook.h:97
AbNumList * last
Last item.
short EntId
Definition addressbook.h:59
short NrJ
Definition addressbook.h:53
char _1D
Definition addressbook.h:83
char field_B
Definition addressbook.h:55
char data_size
Size of the data.
Definition addressbook.h:85
short number_of_records
Definition addressbook.h:50
int flag_data
Type.
Definition addressbook.h:99
short NrOfFlds
Definition addressbook.h:49
char field_A
Definition addressbook.h:54
char _0_1
Definition addressbook.h:86
AbNumList * first
First item.
void * data
Pointer to the PKT_NUM.
char field_11
Definition addressbook.h:58
AB_UNPRES_ITEM * record_list
Definition addressbook.h:56
char format
Format of the data.
Definition addressbook.h:84
short NrAllocFlds
Definition addressbook.h:51
void * prev
Pointer to the prev item.
Definition addressbook.h:98
short field_6
Definition addressbook.h:52
char data[128]
Raw data.
Definition addressbook.h:89
char _0_2
Definition addressbook.h:87
int UnpackABentry(AB_UNPRES *entry, const void *data, int size, int flags)
Unpack entry.
WSHDR * GetNumFromNativeAbData(NativeAbData *data, int type, int index)
Get number from the NativeAbData.
int FreeNativeAbData(NativeAbData *data)
Free allocated native addressbook data.
int GetFilledNAbDataCount(NativeAbData *data)
Get count of the items in NativeAbData.
int SetNumToNativeAbData(NativeAbData *data, int type, const WSHDR *num)
Set number to the NativeAbData.
NativeAbData * AllocNativeAbData(void)
Allocate native addressbook data.
int GetTypeOfAB_UNPRES_ITEM(int item_type)
Convert AB_UNPRES.item_type to the NativeAbData item type.
void UnpackNumPkt(const PKT_NUM *pkt, char *buf, int maxlen)
Decode PKT_NUM for the phone number.
int GetNativeAbDataType(NativeAbData *data, int index)
Get item type from the NativeAbData by index.
int OpenNativeAddressbook(int type, int unk1, int unk2, NativeAbData *data)
Open native address book.
PKT_NUM * GetDataFromNAbData(NativeAbData *data, int index)
Get item data from the NativeAbData by index.
int FreeUnpackABentry(AB_UNPRES *entry, void *mfree_fn)
Free unpacked entry.
int GetNativeAbDataStatus(NativeAbData *data, int index)
Get item status from the NativeAbData by index.
Uncompressed APO entry.
Definition addressbook.h:47
Item of the AB_UNPRES.
Definition addressbook.h:27
Item of the adressbook list.
Definition addressbook.h:96
Native address book data.
Value of the adressbook list item.
Definition addressbook.h:82
Wide-string header.
Definition wstring.h:35
#define const
Definition zconf.h:115