comparison src/aci2/aci/psa_waps.c @ 3:93999a60b835

src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 00:29:36 +0000
parents
children
comparison
equal deleted inserted replaced
2:c41a534f33c6 3:93999a60b835
1 /*
2 +-----------------------------------------------------------------------------
3 | Project :
4 | Modul : J:\g23m-aci\aci\psa_waps.c
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 :
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifdef FF_WAP
22
23 #ifndef PSA_WAPS_C
24 #define PSA_WAPS_C
25 #endif
26
27 #include "aci_all.h"
28 /*==== INCLUDES ===================================================*/
29 #include "aci_cmh.h"
30 #include "ati_cmd.h"
31 #include "aci_cmd.h"
32
33 #ifdef FAX_AND_DATA
34 //#include "aci_fd.h"
35 #endif /* of #ifdef FAX_AND_DATA */
36
37
38 #include "aci.h"
39 #include "psa.h"
40 #include "psa_sim.h"
41 #include "psa_sms.h"
42 #include "psa_mmi.h"
43 #include "cmh.h"
44 //#include "cmh_sim.h"
45 #include "phb.h"
46 #include "aoc.h"
47
48 #ifdef SIM_TOOLKIT
49 #include "psa_cc.h"
50 #include "psa_sat.h"
51 #endif /* SIM_TOOLKIT */
52
53 #include "psa_waps.h"
54
55 #include "dti.h"
56 #include "dti_conn_mng.h"
57 #include "dti_cntrl_mng.h"
58
59
60
61 /*==== CONSTANTS ==================================================*/
62
63
64 /*==== TYPES ======================================================*/
65
66
67 /*==== EXPORT =====================================================*/
68
69
70 /*==== VARIABLES ==================================================*/
71
72
73 /*==== FUNCTIONS ==================================================*/
74
75
76
77
78
79 SHORT psaMMI_WAP_IND (UBYTE event_id,void* data, USHORT data_size)
80 {
81 PALLOC_SDU (mmi_wap_ind, MMI_WAP_IND, (USHORT)(8*data_size));
82 mmi_wap_ind->event_id = event_id;
83 mmi_wap_ind->sdu.o_buf = 0;
84 mmi_wap_ind->sdu.l_buf = 8*data_size;
85 memcpy(mmi_wap_ind->sdu.buf,data,data_size);
86 PSENDX (WAP, mmi_wap_ind);
87
88 return 0;
89 }
90
91
92 SHORT psaMMI_WAP_REQ (UBYTE event_id, UBYTE ti, void* data, USHORT data_size)
93 {
94 PALLOC_SDU (mmi_wap_req, MMI_WAP_REQ, (USHORT)(8*data_size));
95 mmi_wap_req->event_id = event_id;
96 mmi_wap_req->ti = ti;
97 mmi_wap_req->sdu.o_buf = 0;
98 mmi_wap_req->sdu.l_buf = 8*data_size;
99 memcpy(mmi_wap_req->sdu.buf,data,data_size);
100 PSENDX (WAP, mmi_wap_req);
101
102 return 0;
103 }
104
105 SHORT psaMMI_WAP_CNF (UBYTE event_id,UBYTE ti,void* data, USHORT data_size)
106 {
107 PALLOC_SDU (mmi_wap_cnf, MMI_WAP_CNF, (USHORT)(8*data_size));
108 mmi_wap_cnf->event_id = event_id;
109 mmi_wap_cnf->ti = ti;
110 mmi_wap_cnf->sdu.o_buf = 0;
111 mmi_wap_cnf->sdu.l_buf = 8*data_size;
112 memcpy(mmi_wap_cnf->sdu.buf,data,data_size);
113 PSENDX (WAP, mmi_wap_cnf);
114
115 return 0;
116 }
117
118
119
120 /*
121 +-------------------------------------------------------------------+
122 | PROJECT : GSM-PS (6147) MODULE : PSA_WAPS |
123 | ROUTINE : psaWAP_Dti_Req |
124 +-------------------------------------------------------------------+
125
126 PURPOSE : connect/disconnect WAP
127
128 */
129
130 GLOBAL void psaWAP_Dti_Req(ULONG link_id, UBYTE peer_to_connect_to, UBYTE dti_conn)
131 {
132 PALLOC( wap_dti_req, WAP_DTI_REQ);
133
134 TRACE_FUNCTION("psaWAP_Dti_Req");
135
136 wap_dti_req -> dti_conn = dti_conn;
137 wap_dti_req -> link_id = link_id;
138 wap_dti_req -> dti_direction = DTI_CHANNEL_TO_LOWER_LAYER;
139 strcpy((char*)wap_dti_req->entity_name, dti_entity_name[peer_to_connect_to].name);
140
141 if (dti_conn EQ WAP_CONNECT_DTI)
142 {
143 if (dti_cntrl_set_conn_parms(link_id, DTI_ENTITY_WAP, DTI_INSTANCE_NOTPRESENT, DTI_SUB_NO_NOTPRESENT) EQ FALSE)
144 {
145 return;
146 }
147 }
148
149 PSENDX( WAP, wap_dti_req );
150 }
151
152 #endif /* FF_WAP */