comparison src/aci2/aci/phb_aci.h @ 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 : MMI-Framework (8417)
4 | Modul : PSA_PHB
5 +-----------------------------------------------------------------------------
6 | Copyright 2005 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 : Interface of SIM phonebook to ACI (and MFW)
18 |
19 | Details can be found in the design document
20 | "Phone Book Re-Architecture
21 +-----------------------------------------------------------------------------
22 */
23
24 #ifndef PHB_ACI_H
25 #define PHB_ACI_H
26
27 #include "phb_sim.h"
28
29 /*
30 * Constants
31 */
32
33 /* FDN operation mode */
34 typedef enum
35 {
36 NO_OPERATION = 0, /* */
37 FDN_DISABLE, /* FDN disabled */
38 FDN_ENABLE /* FDN enabled */
39 } T_PHB_FDN_MODE;
40
41
42 /* Phonebook callback event */
43 typedef enum
44 {
45 PHB_CB_BOOK_LOCKED, /* Phonebook locked by SIM activity */
46 PHB_CB_BOOK_UNLOCKED, /* Phonebook unlocked from SIM activity */
47 PHB_CB_WRITE_FINISHED /* Write / delete operation finished */
48 } T_PHB_CB_EVENT;
49
50
51 /* Phonebook status */
52 typedef enum
53 {
54 PHB_UNKNOWN = 0, /* Status unknown */
55 PHB_BUSY, /* Phonebook busy, e.g. SIM access in progress */
56 PHB_READY, /* Phonebook ready */
57 PHB_WRITE_FAIL /* Write failed */
58 } T_PHB_STAT;
59
60 /*
61 * Type definitions
62 */
63 /* The ACI part of the phonebook does not define it's own structures or data
64 * types (except of enums which are considered as constants) but relies on
65 * data types defined by the SIM part of the phonebook respective the
66 * database manager. */
67
68 /*
69 * Function prototypes
70 */
71
72 void pb_init (void);
73 void pb_exit (void);
74 void pb_reset (void);
75 void pb_set_sim_ecc (USHORT cause,
76 UBYTE ecc_len,
77 const UBYTE *sim_ecc);
78 void pb_inserted_sim (UBYTE c_sim_serv,
79 UBYTE *sim_serv,
80 const T_imsi_field *imsi_field,
81 UBYTE adn_bdn_fdn_func,
82 UBYTE phase);
83 void pb_start_build (BOOL unchanged);
84 BOOL pb_update (int ref,
85 T_SIM_FILE_UPDATE_IND *fu);
86 T_PHB_RETURN pb_flush_data (void);
87 T_PHB_RETURN pb_add_record (T_PHB_TYPE type,
88
89 USHORT phy_recno,
90 const T_PHB_RECORD *entry);
91 T_PHB_RETURN pb_del_record (T_PHB_TYPE type,
92 USHORT phy_recno);
93 T_PHB_RETURN pb_check_fdn (UBYTE toa,
94 const UBYTE *number);
95 T_PHB_RETURN pb_switch_adn_fdn (T_PHB_FDN_MODE mode,
96 T_ACI_CLASS classFDN);
97 T_PHB_RETURN pb_del_book (T_PHB_TYPE book);
98 T_ACI_CLASS pb_get_fdn_classtype (void);
99 T_PHB_FDN_MODE pb_get_fdn_mode (void);
100
101 /*
102 * Wrapper functions
103 */
104
105 T_PHB_RETURN pb_read_record (T_PHB_TYPE type,
106 SHORT phy_recno,
107 T_PHB_RECORD *entry);
108 T_PHB_RETURN pb_read_alpha_record (T_PHB_TYPE type,
109 SHORT order_num,
110 T_PHB_RECORD *entry);
111 T_PHB_RETURN pb_read_number_record (T_PHB_TYPE type,
112 SHORT order_num,
113 T_PHB_RECORD *entry);
114 T_PHB_RETURN pb_search_name (T_PHB_TYPE type,
115 T_PHB_MATCH match,
116 const T_ACI_PB_TEXT *search_tag,
117 SHORT *order_num);
118 T_PHB_RETURN pb_search_number (T_PHB_TYPE type,
119 const UBYTE *number,
120 SHORT *order_num);
121 T_PHB_RETURN pb_read_sizes (T_PHB_TYPE type, /* IN */
122 SHORT *max_rcd, /* OUT */
123 SHORT *used_rcd, /* OUT */
124 UBYTE *num_len, /* OUT */
125 UBYTE *tag_len); /* OUT */
126 int pb_get_entry_len (const UBYTE *pb_tag,
127 UBYTE max_pb_len);
128 T_PHB_RETURN pb_del_book (T_PHB_TYPE type);
129
130 /*
131 * Improved functionality / backward compatibility
132 */
133 T_PHB_RETURN pb_search_number_ex (T_PHB_TYPE type,
134 const UBYTE *number,
135 SHORT *order_num,
136 SHORT *found,
137 T_PHB_RECORD *entry);
138
139 T_PHB_RETURN pb_search_name_ex (T_PHB_TYPE type,
140 T_PHB_MATCH match,
141 const T_ACI_PB_TEXT *search_tag,
142 SHORT *order_num,
143 SHORT *found,
144 T_PHB_RECORD *entry);
145
146 /*
147 * New functionality
148 */
149 int pb_find_free_record (T_PHB_TYPE type);
150
151 #endif /* #ifndef PHB_ACI_H */