|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef NW_PARSER_WBXML_DICTIONARYCONTEXT_H |
|
19 #define NW_PARSER_WBXML_DICTIONARYCONTEXT_H |
|
20 |
|
21 /* TODO: Change dictionaries to be all static const. Currently |
|
22 * they are stored inside the context. |
|
23 */ |
|
24 |
|
25 #define MAX_DICTIONARIES 9 |
|
26 |
|
27 |
|
28 /* Temporary methods for storing dictionary & dictionary size inside the context. |
|
29 */ |
|
30 |
|
31 #include <xml/cxml/cxml_proj.h> |
|
32 #include <xml/cxml/nw_wbxml_dictionary.h> |
|
33 |
|
34 |
|
35 #ifdef __cplusplus |
|
36 extern "C" |
|
37 { |
|
38 #endif /* __cplusplus */ |
|
39 |
|
40 typedef enum { |
|
41 NW_CONTEXT_REF_DICT_CNT_INR, |
|
42 NW_CONTEXT_REF_DICT_CNT_DCR |
|
43 } CXML_DICT_REF_CNT; |
|
44 |
|
45 void StoreDictionaries(NW_WBXML_Dictionary_t** dictionaries); |
|
46 NW_WBXML_Dictionary_t** GetDictionaries(); |
|
47 void StoreDictionaryCount(NW_Uint32 dictionary_count); |
|
48 NW_Uint32 GetDictionaryCount(); |
|
49 void DestroyDictionaries(); |
|
50 /*The following function takes parameter of type CXML_DICT_REF_CNT only */ |
|
51 void UpdateDictRefCnt(CXML_DICT_REF_CNT updateVal); |
|
52 |
|
53 #ifdef __cplusplus |
|
54 } // extern "C" { |
|
55 #endif /* __cplusplus */ |
|
56 |
|
57 |
|
58 #endif // NW_PARSER_WBXML_DICTIONARYCONTEXT_H |