SWILIB API (SG)    
Loading...
Searching...
No Matches
telephony.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
18typedef struct RAMNET RAMNET;
19typedef struct PDU PDU;
21typedef struct StructUSSD StructUSSD;
28typedef struct EAM_DATA EAM_DATA;
30
34#ifdef NEWSGOLD
35struct GBS_USSD_MSG {
36 int pid_from;
37 int msg;
38 void *pkt;
39 char unk1;
40 char encoding_type;
41 char pkt_length;
42 char unk2;
43 void *data1;
44};
45#else
47 short pid_from;
48 short msg;
49 void *pkt;
50 char unk1;
53 char unk2;
54 void *data1;
55};
56#endif
57
61struct RAMNET {
62 uint16_t ch_number;
63 uint16_t ci;
64 uint16_t lac;
65 char power;
66 char c1;
67 char c2;
68 char unk;
69 uint16_t unk2;
70};
71
75struct PDU {
76 char data[0xB2];
77};
78
83 uint32_t type;
84 uint32_t param2;
85 uint16_t param3;
86 uint16_t wstr[25];
87};
88
92struct StructUSSD {
93 void *p1;
94 void *p2;
96};
97
102 char unk0;
103 char unk1;
105};
106
111 void *unk_proc0; // 0xA09D901D S7Cv47
112 void *unk_proc1; // 0xA09D9025 S7Cv47
113 short index; // 1,2,3 ...
114 char unk[6];
115 short unk1; // another index ?
117 char cnt_received; // =cnt0;
118 uint16_t *data_id; // depend on cnt, for GetSmsPosIndex to get pos_index
119 short unk2; // 0, 0x700
120 short unk3; // 0
121 char unk4; // 3
122 char unk5; // 0, 3
123 char type; // 0, in read, 1, in new, 3,sent
124 char new_cnt_data; // ?
125};
126
131 void *next;
132 void *prev;
134 // short unk0; //0xB2 pdu_size ?
135 // short unk1; //0x4077 SMS_SIMIF_SM_CEPID ?
136 // int unk2; //0x190 ?
137 // void *unk3; //a list ?
138};
139
146 void *unk_proc; // 0xA09DA18D // S7Cv47
147};
148
170
174struct EAM_DATA {
176 char unk_FF[2];
177 int opmsg_id; // browser killer, -1
178 char unk[8];
179};
180
185// char unk_FF[0x10];
186 int unk;
188};
189
197__swi_begin(0x170)
198int MakeVoiceCall(const char *number, int unk1, int unk2)
199__swi_end(0x170, MakeVoiceCall, (number, unk1, unk2));
200
206__swi_begin(0x286)
207int GetSMSState(void)
208__swi_end(0x286, GetSMSState, ());
209
216__swi_begin(0x046)
217int HasNewSMS(void)
218__swi_end(0x046, HasNewSMS, ());
219
224__swi_begin(0x047)
225int HasFlashSMS(void)
226__swi_end(0x047, HasFlashSMS, ());
227
236__swi_begin(0x80CD)
238__swi_end(0x80CD, RamMissedSMS, ());
239
247__swi_begin(0x80D4)
249__swi_end(0x80D4, RamMissedMessage, ());
250
255__swi_begin(0x04C)
258
266__swi_begin(0x80CC)
268__swi_end(0x80CC, RamMissedCalls, ());
269
274__swi_begin(0x06E)
275int IsCalling(void)
276__swi_end(0x06E, IsCalling, ());
277
282__swi_begin(0x072)
285
290__swi_begin(0x289)
292__swi_end(0x289, isDecryption, ());
293
299__swi_begin(0x07D)
300int IsIncognitoCall(int call_id)
301__swi_end(0x07D, IsIncognitoCall, (call_id));
302
307__swi_begin(0x067)
309__swi_end(0x067, IsDirectCallActive, ());
310
315__swi_begin(0x8290)
317__swi_end(0x8290, RamCallState, ());
318
324__swi_begin(0x073)
325int GetTypeOfCall(int type)
326__swi_end(0x073, GetTypeOfCall, (type));
327
334__swi_begin(0x080)
335int ShowCallList(int list, int zero)
336__swi_end(0x080, ShowCallList, (list, zero));
337
341__swi_begin(0x065)
342void EndCall(void)
343__swi_end(0x065, EndCall, ());
344
350__swi_begin(0x066)
351void EndCallBusy(int param1, int param2)
352__swi_end(0x066, EndCallBusy, (param1, param2));
353
359__swi_begin(0x8253)
360uint16_t *RamLastCallNum()
361__swi_end(0x8253, RamLastCallNum, ());
362
367__swi_begin(0x81EB)
368char *RAM_IMSI(void)
369__swi_end(0x81EB, RAM_IMSI, ());
370
375__swi_begin(0x81F4)
378
383__swi_begin(0x80CA)
385__swi_end(0x80CA, RamNet, ());
386
391__swi_begin(0x80D6)
393__swi_end(0x80D6, RamNetOnline, ());
394
399__swi_begin(0x0051)
401__swi_end(0x0051, GetNetAccessMode, ());
402
407__swi_begin(0x2C3)
409__swi_end(0x2C3, GetRoamingState, ());
410
419__swi_begin(0x810D)
420uint16_t *GetCI()
421__swi_end(0x810D, GetCI, ());
422
427__swi_begin(0x1A7)
429__swi_end(0x1A7, Get_CC_NC, ());
430
437__swi_begin(0x041)
438char GetProvider(WSHDR *name, int unk)
439__swi_end(0x041, GetProvider, (name, unk));
440
446__swi_begin(0x2C2)
448__swi_end(0x2C2, GetSubprovider, (name));
449
454__swi_begin(0x111)
456__swi_end(0x111, GetTypeUSSD, ());
457
463__swi_begin(0x112)
465__swi_end(0x112, SetUSSD, (req));
466
470__swi_begin(0x238)
472__swi_end(0x238, SendAutoUSSDack, ());
473
477__swi_begin(0x10F)
479__swi_end(0x10F, freeUSSD, ());
480
490__swi_begin(0x1DA)
491int SendSMS(WSHDR *text, const char *number, int cepid, int msg, int flag)
492__swi_end(0x1DA, SendSMS, (text, number, cepid, msg, flag));
493
498__swi_begin(0x81DB)
500__swi_end(0x81DB, IncommingPDU, ());
501
508__swi_begin(0x2AC)
509int DeleteSMS(int index, short *del_cnt)
510__swi_end(0x2AC, DeleteSMS, (index, del_cnt));
511
518__swi_begin(0x2AD)
519int SetSmsStatus(int index, int status)
520__swi_end(0x2AD, SetSmsStatus, (index, status));
521
526__swi_begin(0x82B1)
528__swi_end(0x82B1, SmsDataRoot, ());
529
534__swi_begin(0x2B2)
535int GetSmsPosIndex(SMS_POS_INDEX_DATA *buf, int data_id)
536__swi_end(0x2B2, GetSmsPosIndex, (buf, data_id));
537
542__swi_begin(0x82C5)
544__swi_end(0x82C5, RAM_EMS_Admin, ());
545
556__swi_begin(0x21D)
557int GSMTXT_Decode(WSHDR *result, void *pkt, int len, int encoding_type, malloc_func_t malloc_fn, mfree_func_t mfree_fn)
558__swi_end(0x21D, GSMTXT_Decode, (result, pkt, len, encoding_type, malloc_fn, mfree_fn));
559
563__swi_begin(0x22A)
564void FreeGSMTXTpkt(void *pkt)
565__swi_end(0x22A, FreeGSMTXTpkt, (pkt));
566
571__swi_begin(0x048)
572void ReadNewSMS(void)
573__swi_end(0x048, ReadNewSMS, ());
574
580__swi_begin(0x049)
581int ReadFlashSMS(int ack)
582__swi_end(0x049, ReadFlashSMS, (ack));
583
587__swi_begin(0x233)
589__swi_end(0x233, GetAllEmail, ());
590
592
#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 *(* malloc_func_t)(size_t size)
malloc()
Definition base.h:64
void(* mfree_func_t)(void *ptr)
free()
Definition base.h:65
uint16_t * data_id
Definition telephony.h:118
uint16_t unk2
Definition telephony.h:69
short unk_0xFFFF
Definition telephony.h:155
short cnt_in_new_sms_dat
Count of the unread SMS.
Definition telephony.h:158
SMS_DATA_LLIST in_msg
List of the incoming SMS.
Definition telephony.h:153
char unk[6]
Definition telephony.h:114
EAM_DATA data[101]
Definition telephony.h:187
short cnt_in_new_opwv
Definition telephony.h:159
char unk
Definition telephony.h:68
short cnt_msg_in_read
Count of the incoming SMS.
Definition telephony.h:157
void * unk_proc0
Definition telephony.h:111
uint16_t ch_number
GSM channel number.
Definition telephony.h:62
char power
Signal power.
Definition telephony.h:65
uint16_t wstr[25]
USSD number in UTF-16.
Definition telephony.h:86
char new_cnt_data
Definition telephony.h:124
uint16_t param3
Definition telephony.h:85
short msg
MSG_USSD_RX
Definition telephony.h:48
char pkt_length
Size of the USSD reply packet.
Definition telephony.h:52
INDEX_ID_DATA * index_id_data
Definition telephony.h:133
short cnt_freespace_data
Definition telephony.h:163
short cnt_new_in_data
Incoming unread SMS segments.
Definition telephony.h:165
void * p1
Definition telephony.h:93
void * data1
Definition telephony.h:54
SMS_DATA_LIST * first
Pointer to the first SMS.
Definition telephony.h:144
char data[0xB2]
Raw PDU bytes.
Definition telephony.h:76
uint16_t lac
Local Area Code.
Definition telephony.h:64
short dat_index
Definition telephony.h:175
char c1
Definition telephony.h:66
short cnt_in_data
Incoming SMS segments.
Definition telephony.h:164
void * p2
Definition telephony.h:94
uint16_t ci
Cell Identity.
Definition telephony.h:63
void * unk_proc1
Definition telephony.h:112
SMS_DATA_LIST * last
Pointer to the last SMS.
Definition telephony.h:145
short cnt_sms_sent
Count of the sent SMS.
Definition telephony.h:160
uint32_t type
Type of the USSD.
Definition telephony.h:83
short cnt_sms_draft
Count of the unsent SMS (drafts).
Definition telephony.h:161
short pid_from
cepid of the sender
Definition telephony.h:47
void * pkt
USSD reply packet.
Definition telephony.h:49
StructUSSDStr * pussdstr
Definition telephony.h:95
int opmsg_id
Definition telephony.h:177
char cnt_received
Definition telephony.h:117
void * unk_proc
Definition telephony.h:146
uint32_t param2
Definition telephony.h:84
char unk[8]
Definition telephony.h:178
char c2
Definition telephony.h:67
char encoding_type
Encoding of the USSD reply packet.
Definition telephony.h:51
short cnt_draft_data
Outgoing unsent SMS segments (drafts)
Definition telephony.h:167
SMS_DATA_LLIST out_msg
List of the outgoing SMS.
Definition telephony.h:154
short cnt_sent_data
Outgoing SMS segments.
Definition telephony.h:166
char unk_FF[2]
Definition telephony.h:176
void SendAutoUSSDack(void)
Send auto-ACK for the current USSD.
RAM_EMS_ADMIN * RAM_EMS_Admin()
Get pointer to the EMS Admin data.
int ShowCallList(int list, int zero)
Open calls list phone UI.
int GetNetAccessMode()
Get current network access mode.
PDU * IncommingPDU(void)
Get PDU from the received SMS message (in MSG_SMS_RX event).
int GetSubprovider(WSHDR *name)
Get name of the current cellurar sub-provider.
void EndCallBusy(int param1, int param2)
Cancel current call with BUSY status.
int GetDurationFromCurrentCall(void)
Get current call diration.
char * RAM_IMSI(void)
Get IMSI of the SIM card.
int SendSMS(WSHDR *text, const char *number, int cepid, int msg, int flag)
Send SMS.
char GetTypeUSSD()
Get type of the current USSD request.
void FreeGSMTXTpkt(void *pkt)
Free USSD response packet.
SMS_DATA_ROOT * SmsDataRoot()
Get root of the SMS list (Openwave).
int GSMTXT_Decode(WSHDR *result, void *pkt, int len, int encoding_type, malloc_func_t malloc_fn, mfree_func_t mfree_fn)
Decode GSM-encoded text.
int isDecryption(void)
Check if current call in decryption state.
char * RamCallState()
State of the current call.
int GetMissedCallsCount(void)
Check for missed calls.
char * RamMissedSMS()
Pointer to the for missed SMS count.
int * RamNetOnline()
Network online flag.
uint32_t SetUSSD(const StructUSSDStr *req)
Set current USSD request.
char * Get_CC_NC()
Get cell network MCC & MNC.
char * RamServiceProviderName(void)
Get cellurar operator name.
uint16_t * RamLastCallNum()
Number of the last call in call slot 1, as UTF-16 characters.
int SetSmsStatus(int index, int status)
Update SMS status (Openwave).
int IsIncognitoCall(int call_id)
Check if the call has a number.
int IsDirectCallActive(void)
Checking for an active direct call.
void freeUSSD()
Free current USSD request.
void ReadNewSMS(void)
Open new received SMS in SMS UI.
uint16_t * GetCI()
Get current network cell identification.
int ReadFlashSMS(int ack)
Open new received flash SMS in SMS UI.
int GetSMSState(void)
Get SMS status.
char GetProvider(WSHDR *name, int unk)
Get name of the current cellurar provider.
int DeleteSMS(int index, short *del_cnt)
Remove SMS from memory (Openwave).
int MakeVoiceCall(const char *number, int unk1, int unk2)
Call the number.
RAMNET * RamNet()
Current cellular network state.
int GetSmsPosIndex(SMS_POS_INDEX_DATA *buf, int data_id)
Get SMS position index (SMS_POS_INDEX_DATA) by data ID.
int HasFlashSMS(void)
Check for a pending flash message (flash SMS, USSD reply or network text) that ReadFlashSMS shows.
int HasNewSMS(void)
Check for new SMS.
char * RamMissedCalls()
Pointer to the for missed calls count.
int GetTypeOfCall(int type)
Get type of the current call.
int IsCalling(void)
Checking for an active call.
void EndCall(void)
Cancel current call.
int GetRoamingState()
Get network roaming status.
char * RamMissedMessage()
Pointer to the for missed messages count.
void GetAllEmail()
Starts "opwvmsg:RGetAllEmail" in Openwave.
EMS Admin data.
Definition telephony.h:174
USSD reply GSB message.
Definition telephony.h:46
SMS index data.
Definition telephony.h:110
SMS PDU.
Definition telephony.h:75
EMS Admin.
Definition telephony.h:184
Cellular network state (http://e71.ru/publ/4-1-0-34).
Definition telephony.h:61
Container of the SMS data.
Definition telephony.h:130
Linked-List of SMS (Openwave).
Definition telephony.h:143
Root of the SMS list (Openwave).
Definition telephony.h:152
SMS position index.
Definition telephony.h:101
USSD request (???).
Definition telephony.h:92
USSD request.
Definition telephony.h:82
Wide-string header.
Definition wstring.h:35
#define const
Definition zconf.h:115