Home | History | Annotate | Download | only in StrGather
      1 /*++
      2 
      3 Copyright (c) 2004 - 2010, 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 ;
     33 void
     34 StringDBDestructor (
     35   void
     36   )
     37 ;
     38 
     39 STATUS
     40 StringDBAddString (
     41   WCHAR   *LanguageName,
     42   WCHAR   *StringIdentifier,
     43   WCHAR   *Scope,
     44   WCHAR   *String,
     45   BOOLEAN Format,
     46   UINT16  Flags
     47   )
     48 ;
     49 
     50 STATUS
     51 StringDBSetScope (
     52   WCHAR   *Scope
     53   )
     54 ;
     55 
     56 #define STRING_FLAGS_REFERENCED           0x0001  // if referenced somewhere
     57 #define STRING_FLAGS_UNDEFINED            0x0002  // if we added it for padding purposes
     58 #define STRING_FLAGS_INDEX_ASSIGNED       0x0004  // so don't change the index value
     59 #define STRING_ID_INVALID                 0xFFFF
     60 #define STRING_ID_LANGUAGE_NAME           0x0000
     61 #define STRING_ID_PRINTABLE_LANGUAGE_NAME 0x0001
     62 
     63 STATUS
     64 StringDBAddStringIdentifier (
     65   WCHAR     *StringIdentifier,
     66   UINT16    *NewId,
     67   UINT16    Flags
     68   )
     69 ;
     70 
     71 STATUS
     72 StringDBReadDatabase (
     73   INT8    *DBFileName,
     74   BOOLEAN IgnoreIfNotExist,
     75   BOOLEAN Verbose
     76   )
     77 ;
     78 
     79 STATUS
     80 StringDBWriteDatabase (
     81   INT8    *DBFileName,
     82   BOOLEAN Verbose
     83   )
     84 ;
     85 
     86 STATUS
     87 StringDBDumpDatabase (
     88   INT8                *DBFileName,
     89   INT8                *OutputFileName,
     90   BOOLEAN             Verbose
     91   )
     92 ;
     93 
     94 STATUS
     95 StringDBAddLanguage (
     96   WCHAR *LanguageName,
     97   WCHAR *PrintableLanguageName
     98   )
     99 ;
    100 
    101 STATUS
    102 StringDBDumpCStrings (
    103   INT8                        *FileName,
    104   INT8                        *BaseName,
    105   WCHAR_STRING_LIST           *LanguagesOfInterest,
    106   WCHAR_MATCHING_STRING_LIST  *IndirectionList
    107   )
    108 ;
    109 
    110 STATUS
    111 StringDBDumpStringDefines (
    112   INT8                *FileName,
    113   INT8                *BaseName
    114   )
    115 ;
    116 
    117 STATUS
    118 StringDBSetCurrentLanguage (
    119   WCHAR *LanguageName
    120   )
    121 ;
    122 
    123 STATUS
    124 StringDBSetStringReferenced (
    125   INT8      *StringIdentifierName,
    126   BOOLEAN   IgnoreNotFound
    127   )
    128 ;
    129 
    130 void
    131 StringDBFormatString (
    132   WCHAR   *String
    133   )
    134 ;
    135 
    136 STATUS
    137 StringDBCreateHiiExportPack (
    138   INT8                *OutputFileName,
    139   WCHAR_STRING_LIST   *LanguagesOfInterest
    140   );
    141 
    142 
    143 #endif // #ifndef _STRING_DB_H_
    144