FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/ms/src/aci/gaci.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : Definitions for GPRS command handler and protocol stack adapter. | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 #include "dti.h" | |
22 #ifndef GACI_H | |
23 #define GACI_H | |
24 | |
25 | |
26 | |
27 /* | |
28 ** | |
29 ** handle states for every context | |
30 ** | |
31 */ | |
32 typedef enum | |
33 { | |
34 CS_INVALID_STATE = 0, /* invalid value */ | |
35 CS_UNDEFINED, /* context not defined */ | |
36 CS_DEFINED, /* context defined */ | |
37 CS_ATTACHING_AFTER_UNDEF, /* mobile must be attached before it's able to activate it */ | |
38 CS_ATTACHING_AFTER_DEF, /* mobile must be attached before it's able to activate it */ | |
39 CS_ESTABLISH_1, /* PPP informed over estblish */ | |
40 CS_ESTABLISH_2, /* SM informed over estblish */ | |
41 CS_ESTABLISH_3, /* PPP informed over activated context */ | |
42 CS_WAITS_FOR_ACTIVATING, /* running class change for mobile class BX */ | |
43 CS_ACTIVATING, /* SM context activating */ | |
44 CS_ABORT_ESTABLISH, /* abort establish */ | |
45 CS_ACTIVATED, /* context activated */ | |
46 CS_DATA_LINK, /* Data link */ | |
47 CS_DEACTIVATE_NORMAL, /* SM deactivating context except by AT command */ | |
48 CS_BREAKDOWN_LINK_NORMAL, /* breakdown data link */ | |
49 CS_BREAKDOWN_LINK_ERROR, /* breakdown data link due to an error */ | |
50 CS_CONTEXT_REACTIVATION_1, /* the network will reactivate the context (PPP_TERMINATE_REQ && SMREG_DEACTIVATE_REQ) */ | |
51 CS_CONTEXT_REACTIVATION_2 /* the network will reactivate the context (PPP_TERMINATE_IND || SMREG_DEACTIVATE_CNF) */ | |
52 | |
53 } T_CONTEXT_STATE; | |
54 | |
55 typedef enum | |
56 { | |
57 AS_INVALID_STATE = 0, /* invalid value */ | |
58 AS_MOBILE_OFF, /* the protocol stack is off before +CFUN=1 */ | |
59 AS_DETACHED, /* GPRS detached */ | |
60 AS_ATTACHED, /* GPRS attached */ | |
61 AS_ATTACHING, /* attaching GPRS */ | |
62 AS_DETACHING, /* detaching GPRS */ | |
63 AS_SUSPENTED /* GPRS suspended */ | |
64 | |
65 } T_ATTACH_STATE; | |
66 | |
67 typedef enum | |
68 { | |
69 GC_TYPE_NONE = -1, /* no connection */ | |
70 GC_TYPE_DATA_LINK = 0, /* Data connection over PPP */ | |
71 GC_TYPE_NULL, /* Data connection with NULL Device */ | |
72 GC_TYPE_SIM, /* Data connection with SIM */ | |
73 GC_TYPE_WAP, /* Data connection for the WAP browser */ | |
74 #if defined (FF_PKTIO) OR defined (FF_TCP_IP) || defined(FF_GPF_TCPIP) OR defined (FF_PSI) | |
75 GC_TYPE_PKT, /* Data connection for PKTIO */ | |
76 #endif /* FF_PKTIO OR FF_TCP_IP || FF_GPF_TCPIP OR FF_PSI */ | |
77 GC_TYPE_EMAIL /* Data connection for an Email - Client */ | |
78 | |
79 } T_GPRS_CONNECT_TYPE; | |
80 | |
81 EXTERN T_CONTEXT_STATE get_state_over_cid ( SHORT cid ); | |
82 EXTERN void set_state_over_cid ( SHORT cid, T_CONTEXT_STATE c_state ); | |
83 EXTERN T_CONTEXT_STATE get_state_working_cid ( void ); | |
84 EXTERN void set_state_working_cid ( T_CONTEXT_STATE c_state ); | |
85 EXTERN T_ACI_CAL_OWN get_owner_over_cid ( SHORT cid ); | |
86 EXTERN T_CONTEXT_STATE get_state_over_nsapi_set( USHORT *nsapi_set, SHORT *cid ); | |
87 EXTERN T_CONTEXT_STATE get_state_over_nsapi ( USHORT nsapi ); | |
88 | |
89 | |
90 | |
91 EXTERN void gaci_init ( void ); | |
92 EXTERN void gaci_reset ( void ); | |
93 EXTERN void gaci_finit ( void ); | |
94 | |
95 #ifdef DTI | |
96 EXTERN SHORT gaci_get_cid_over_link_id ( T_DTI_CONN_LINK_ID link_id ); | |
97 EXTERN SHORT gaci_get_cid_over_dti_id ( UBYTE dti_id ); | |
98 EXTERN T_DTI_CONN_LINK_ID gaci_get_link_id_over_peer ( T_DTI_ENTITY_ID entity_id ); | |
99 #endif | |
100 | |
101 EXTERN void cmhSM_disconnect_cid ( SHORT cid, T_GPRS_CONNECT_TYPE type ); | |
102 EXTERN BOOL uart_is_mt_te_link( void ); | |
103 | |
104 /* for ATZ */ | |
105 EXTERN T_ACI_RETURN sGprsAT_Z ( T_ACI_CMD_SRC srcId ); | |
106 EXTERN BOOL gaci_isATZcmd ( void ); | |
107 | |
108 | |
109 EXTERN void gaci_RAT_caller ( SHORT rat_id, SHORT cid, UBYTE cmdBuf, UBYTE cme_err ); | |
110 EXTERN void gaci_SAT_err(USHORT cause); | |
111 | |
112 #endif /* GACI_H */ | |
113 |