]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Tools/Source/StrGather/StringDB.h
92801f70f88376e65f0b5bf8a469000d9743563b
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / StrGather / StringDB.h
1 /*++
2
3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 StringDB.h
15
16 Abstract:
17
18 Common defines and prototypes for string database management
19
20 --*/
21
22 #ifndef _STRING_DB_H_
23 #define _STRING_DB_H_
24
25 #define LANGUAGE_NAME_STRING_NAME L"$LANGUAGE_NAME"
26 #define PRINTABLE_LANGUAGE_NAME_STRING_NAME L"$PRINTABLE_LANGUAGE_NAME"
27
28 void
29 StringDBConstructor (
30 void
31 );
32 void
33 StringDBDestructor (
34 void
35 );
36
37 STATUS
38 StringDBAddString (
39 WCHAR *LanguageName,
40 WCHAR *StringIdentifier,
41 WCHAR *Scope,
42 WCHAR *String,
43 BOOLEAN Format,
44 UINT16 Flags
45 );
46
47 STATUS
48 StringDBSetScope (
49 WCHAR *Scope
50 );
51
52 #define STRING_FLAGS_REFERENCED 0x0001 // if referenced somewhere
53 #define STRING_FLAGS_UNDEFINED 0x0002 // if we added it for padding purposes
54 #define STRING_FLAGS_INDEX_ASSIGNED 0x0004 // so don't change the index value
55 #define STRING_ID_INVALID 0xFFFF
56 #define STRING_ID_LANGUAGE_NAME 0x0000
57 #define STRING_ID_PRINTABLE_LANGUAGE_NAME 0x0001
58
59 STATUS
60 StringDBAddStringIdentifier (
61 WCHAR *StringIdentifier,
62 UINT16 *NewId,
63 UINT16 Flags
64 );
65
66 STATUS
67 StringDBReadDatabase (
68 INT8 *DBFileName,
69 BOOLEAN IgnoreIfNotExist,
70 BOOLEAN Verbose
71 );
72
73 STATUS
74 StringDBWriteDatabase (
75 INT8 *DBFileName,
76 BOOLEAN Verbose
77 );
78
79 STATUS
80 StringDBDumpDatabase (
81 INT8 *DBFileName,
82 INT8 *OutputFileName,
83 BOOLEAN Verbose
84 );
85
86 STATUS
87 StringDBAddLanguage (
88 WCHAR *LanguageName,
89 WCHAR *PrintableLanguageName
90 );
91
92 STATUS
93 StringDBDumpCStrings (
94 INT8 *FileName,
95 INT8 *BaseName,
96 WCHAR_STRING_LIST *LanguagesOfInterest,
97 WCHAR_MATCHING_STRING_LIST *IndirectionList
98 );
99
100 STATUS
101 StringDBDumpStringDefines (
102 INT8 *FileName,
103 INT8 *BaseName
104 );
105
106 STATUS
107 StringDBSetCurrentLanguage (
108 WCHAR *LanguageName
109 );
110
111 STATUS
112 StringDBSetStringReferenced (
113 INT8 *StringIdentifierName,
114 BOOLEAN IgnoreNotFound
115 );
116
117 void
118 StringDBFormatString (
119 WCHAR *String
120 );
121
122 #endif // #ifndef _STRING_DB_H_