FreeCalypso > hg > tcs211-fcmodem
comparison g23m/condat/com/include/vdbapi.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 : GSM-PS (6147) | |
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 : | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 #ifndef __VDBAPI_H__ | |
22 #define __VDBAPI_H__ | |
23 | |
24 /* | |
25 * @todo anpassen an routing information | |
26 */ | |
27 | |
28 /* | |
29 * Number of protocol stack entities witch concurrently uses the VDB | |
30 */ | |
31 #define VDB_MAX_ENTITIES 8 | |
32 | |
33 /* | |
34 * Identifiers for the protocol stack entities. To use at | |
35 * initialisation of the VDB (vdb_init()). | |
36 */ | |
37 #define VDB_MMI 7 | |
38 #define VDB_SIM 6 | |
39 #define VDB_SMS 5 | |
40 #define VDB_SS 4 | |
41 #define VDB_CC 3 | |
42 #define VDB_MM 2 | |
43 #define VDB_RR 1 | |
44 #define VDB_DL 0 | |
45 | |
46 | |
47 /* | |
48 * Return codes for the state parameter of the vdb_read_req() | |
49 */ | |
50 #define VDB_ENTITY_VALID 1 | |
51 #define VDB_ENTITY_EMPTY 2 | |
52 #define VDB_ENTITY_UNDEF 0 | |
53 | |
54 /* | |
55 * Definition to mark the assi parameter invalid | |
56 * for the function vdb_update_req() | |
57 */ | |
58 #define VDB_INVALID_SSI ((ULONG)-1L) | |
59 | |
60 /* | |
61 * definition of the VDB related part of the destination adress | |
62 * fragment of the primitives used in the base station. | |
63 */ | |
64 | |
65 typedef struct | |
66 { | |
67 UBYTE vdb_id; | |
68 ULONG vdb_handle; | |
69 ULONG search_ssi; | |
70 ULONG send_ssi; | |
71 } T_DEST_ADDR; | |
72 | |
73 | |
74 /* == PROTOTYPES OF THE FUNCTIONAL VDB IMPLEMENTATION ============ */ | |
75 | |
76 EXTERN BOOL vdb_reset (void); | |
77 | |
78 EXTERN BOOL vdb_init (UBYTE entity, | |
79 UBYTE vdb_id); | |
80 | |
81 EXTERN void vdb_read_req (T_DEST_ADDR * da, | |
82 UBYTE entity, | |
83 void **entry, | |
84 UBYTE * state); | |
85 | |
86 EXTERN void vdb_update_req (T_DEST_ADDR * da, | |
87 UBYTE entity, | |
88 void * entry, | |
89 ULONG assi); | |
90 | |
91 EXTERN void vdb_free_req (T_DEST_ADDR * da, | |
92 UBYTE entity); | |
93 | |
94 EXTERN void vdb_unlock_req (T_DEST_ADDR * da); | |
95 | |
96 /* == MACRODEFINITION FOR THE VARIOUS REALISATIONS OF THE VDB == */ | |
97 | |
98 #ifdef VDB_AS_A_MODULE | |
99 | |
100 #define VDB_READ_REQ(l,d,e,v,s) void * v; UBYTE s; vdb_read_req (d,e,&v,&s) | |
101 #define VDB_NET_READ_REQ(l,p,e,v,s) void * v; UBYTE s; NET_TO_DEST(p);\ | |
102 vdb_read_req (&dest_addr,e,&v,&s) | |
103 #define VDB_UNLOCK_REQ(d) vdb_unlock_req (d); | |
104 #define VDB_UPDATE_REQ(d,e,v,a) vdb_update_req (d,e,v,a) | |
105 #define VDB_FREE_REQ(d,e) vdb_free_req (d,e); | |
106 | |
107 #else | |
108 #ifdef VDB_AS_A_SERVER | |
109 /* | |
110 * opcodes may be defined by server stub | |
111 */ | |
112 #define READ_REQ 1 | |
113 #define UPDATE_REQ 2 | |
114 #define FREE_REQ 3 | |
115 | |
116 #define VDB_READ_REQ(l,d,e,v,s) void * v; UCHAR s; vdb (READ_REQ,d,e,&v,&s) | |
117 #define VDB_NET_READ_REQ(l,p,e,v,s) void * v; UCHAR s; NET_TO_DEST(p);\ | |
118 vdb (READ_REQ,&dest_addr,e,&v,&s) | |
119 #define VDB_UNLOCK_REQ(d) vdb (UNLOCK_REQ, d) | |
120 #define VDB_UPDATE_REQ(d,e,v,a) vdb (UPDATE_REQ, d,e,v,a) | |
121 #define VDB_FREE_REQ(d,e) vdb (FREE_REQ, d,e) | |
122 | |
123 #else | |
124 #ifdef VDB_AS_A_PROCESS | |
125 /* | |
126 * Not defined yet | |
127 */ | |
128 #define VDB_READ_REQ(l,d,e,v,s) void l(); send_vdb_read_req (l,d,e); }\ | |
129 void l(T_DEST_ADDR * d, void **v, UBYTE *s) { | |
130 #define VDB_NET_READ_REQ(l,p,e,v,s) void l(); NET_TO_DEST(p);\ | |
131 send_vdb_read_req (l,&dest_addr,e); }\ | |
132 void l(T_DEST_ADDR * d, void **v, UBYTE *s) { | |
133 #define VDB_UNLOCK_REQ(d) send_vdb_read_req (d) | |
134 #define VDB_UPDATE_REQ(d,e,v,a) send_vdb_update_req (d,e,v,a) | |
135 #define VDB_FREE_REQ(d,e) send_vdb_free_req (d,e) | |
136 | |
137 #endif | |
138 #endif | |
139 #endif | |
140 | |
141 #endif | |
142 |