comparison src/g23m-aci/aci/aoc.h @ 162:53929b40109c

src/g23m-aci: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 11 Oct 2016 02:02:43 +0000
parents
children
comparison
equal deleted inserted replaced
161:4557e2a9c18e 162:53929b40109c
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : AOC
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 advice of charge
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef AOC_H
22 #define AOC_H
23
24 /*
25 * States of Module
26 */
27 #define AOC_NULL 0
28 #define AOC_DISABLE 1
29 #define AOC_ENABLE 2
30
31 /*
32 * Info Causes
33 */
34 #define AOC_START_TIME 1
35 #define AOC_STOP_TIME 2
36 #define AOC_START_AOC 3
37 #define AOC_SUSPEND_AOC 4
38 #define AOC_RESUME_AOC 5
39 #define AOC_CALL_CONNECTED 6
40
41 /*
42 * Request Types
43 */
44 #define AOC_CTV 0
45 #define AOC_CCM 1
46 #define AOC_ACM 2
47 #define AOC_ACMMAX 3
48 #define AOC_PUCT 4
49 #define AOC_CCM_PUCT 5
50 #define AOC_ACM_PUCT 6
51 #define AOC_ACMMAX_PUCT 7
52 #define AOC_PUCT_RAW 8
53
54 /*
55 * Status of update operation
56 */
57 #define FIRST_UPDATE 0
58 #define SECOND_UPDATE 1
59 #define VERIFY_PWD 2
60
61 /*
62 * maximum remaining call time in milliseconds
63 */
64 #define AOC_MAX_REMAIN_CALL_TIME 30000L
65 #define AOC_THOUSAND_MILLISECONDS 1000L
66
67 /*
68 * indicates the processing mode for calculating remaining call time
69 */
70 #define AOC_AOC_TIMER_ELAPSED 0
71 #define AOC_CALL_TIMER_ELAPSED 1
72
73 /*
74 * Structure for requesting PUCT Values
75 */
76 typedef struct
77 {
78 UBYTE currency [4];
79 UBYTE value [20];
80 } T_puct;
81
82 typedef struct
83 {
84 UBYTE currency [4];
85 ULONG eppu;
86 ULONG exp;
87 ULONG sexp;
88 } T_puct_raw;
89
90 /*
91 * e_bitmap parameter
92 */
93
94 #define E1_CHANGED 1
95 #define E2_CHANGED 2
96 #define E3_CHANGED 4
97 #define E4_CHANGED 8
98 #define E7_CHANGED 64
99
100 typedef struct
101 {
102 USHORT e1; /* e1 parameter */
103 USHORT e2; /* e2 parameter */
104 USHORT e3; /* e3 parameter */
105 USHORT e4; /* e4 parameter */ /* will be cleared after charged */
106 USHORT e5; /* e5 parameter */
107 USHORT e6; /* e6 parameter */
108 USHORT e7; /* e7 parameter */ /* will be cleared when reached */
109
110 UBYTE e_next_bitmap; /* validity of e-parameter */
111 USHORT e1_next; /* e1 parameter in abeyance*/
112 USHORT e2_next; /* e2 parameter in abeyance*/
113 USHORT e3_next; /* e3 parameter in abeyance*/ /* See AOC08226 !!! */
114 USHORT e7_next; /* e7 parameter in abeyance*/
115
116 ULONG first_unit; /* ccm increment first unit*/
117 ULONG next_unit; /* ccm increment next unit */
118 T_TIME first_interval; /* time first interval */
119 T_TIME next_interval; /* time next interval */
120
121 T_TIME remaining_time; /* remaining time for timer*/
122 UBYTE aoc_timer_running;/* timer is running ? */
123 UBYTE new_data_avail; /* E-Parameter have changed*/
124 T_TIME time_ut_charge; /* time in sec until next */
125 /* charging occur */
126 UBYTE aoci_active; /* indicate charge only */
127 } T_CC_AOC_TBL;
128
129 EXTERN UBYTE aoc_init (UBYTE phase, UBYTE *sim_service_table);
130 EXTERN void aoc_reset (void);
131 EXTERN void aoc_sms (void);
132 EXTERN UBYTE aoc_info (SHORT Cid, UBYTE cause);
133 EXTERN void aoc_get_values (UBYTE value_type, void * value);
134 EXTERN T_ACI_RETURN aoc_set_values (T_ACI_CMD_SRC srcId,
135 UBYTE value_type,
136 void * value,
137 UBYTE * password);
138 EXTERN UBYTE aoc_check_moc (void);
139 EXTERN void aoc_parameter (SHORT Cid,
140 T_FWD_CHG_ADVICE_INV * aoc_para);
141 EXTERN void aoc_send_ccm (void);
142 EXTERN UBYTE aoc_ssc (UBYTE nr, UBYTE * serv_table);
143 EXTERN void aoc_read_acm_cb (SHORT table_id);
144 EXTERN void aoc_read_acmmax_cb (SHORT table_id);
145 EXTERN void aoc_read_puct_cb (SHORT table_id);
146 EXTERN void aoc_init_calltable (void);
147 EXTERN UBYTE aoc_timeout (USHORT handle);
148 EXTERN void aoc_timeout_call_timer (void);
149 EXTERN void aoc_timeout_aoc_timer (SHORT Cid);
150 EXTERN UBYTE aoc_non_zero_cai (SHORT Cid);
151 EXTERN UBYTE aoc_check_acm (void);
152 EXTERN void aoc_calculate_charging_parameter (SHORT Cid);
153 EXTERN void aoc_increment_initial_charge (SHORT Cid);
154 EXTERN void aoc_increment_charge (ULONG increment, UBYTE ever);
155 EXTERN void aoc_increment_cb (SHORT table_id);
156 EXTERN void aoc_calculate_puct (ULONG value, T_puct * result);
157 EXTERN void aoc_update_sim_datafield ( UBYTE operation,
158 UBYTE accType,
159 USHORT reqDataFld,
160 void (*rplyCB)(SHORT));
161 EXTERN void aoc_update_puct (UBYTE operation, T_puct * value);
162 EXTERN void aoc_update_acm_cb (SHORT table_id);
163 EXTERN void aoc_update_acmmax_cb (SHORT table_id);
164 EXTERN void aoc_update_puct_cb (SHORT table_id);
165 EXTERN UBYTE aoc_set_puct_values (T_puct * puct);
166 EXTERN USHORT aoc_getEVal ( void * eBuf );
167 #endif