include/alp/localemgr.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 1999-2008 ACCESS CO., LTD. All rights reserved.
00003  * Copyright (c) 2006 PalmSource, Inc (an ACCESS company). All rights reserved.
00004  ******************************************************************************/
00010 #ifndef ALP_LOCALE_MGR_H
00011 #define ALP_LOCALE_MGR_H
00012 
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016 
00017 #include <glib.h>
00018 #include <alp/types.h>
00019 #include <alp/sysclass.h>
00020 
00027 // ----------------------------------------------------------------------------
00028 // error codes
00029 // ----------------------------------------------------------------------------
00030 
00032 #define ALP_LOCALE_ERR_LOCALE_NOT_FOUND         (ALP_CLASS_LOCALE | 0x00010000)
00033 
00035 #define ALP_LOCALE_ERR_SETTING_NOT_FOUND        (ALP_CLASS_LOCALE | 0x00020000)
00036 
00038 #define ALP_LOCALE_ERR_DATABASE                 (ALP_CLASS_LOCALE | 0x00030000)
00039 
00041 #define ALP_LOCALE_ERR_OUT_OF_MEMORY            (ALP_CLASS_LOCALE | 0x00040000)
00042 
00044 #define ALP_LOCALE_ERR_PERMISSION_DENIED        (ALP_CLASS_LOCALE | 0x00050000)
00045 
00047 #define ALP_LOCALE_ERR_ALREADY_EXISTS           (ALP_CLASS_LOCALE | 0x00060000)
00048 
00050 #define ALP_LOCALE_ERR_IN_USE                   (ALP_CLASS_LOCALE | 0x00070000)
00051 
00052 // ----------------------------------------------------------------------------
00053 // data structures
00054 // ----------------------------------------------------------------------------
00055 
00057 typedef void * AlpLocLocaleType;
00058 
00060 typedef gint AlpLocLocaleSettingChoice;
00061 
00062 // ----------------------------------------------------------------------------
00063 // locale settings defines
00064 // ----------------------------------------------------------------------------
00065 
00067 #define AlpLocChoiceCountryName                 ((AlpLocLocaleSettingChoice)5)
00068 
00070 #define AlpLocChoiceDateFormat                  ((AlpLocLocaleSettingChoice)6)
00071 
00073 #define AlpLocChoiceLongDateFormat              ((AlpLocLocaleSettingChoice)7)
00074 
00076 #define AlpLocChoiceTimeFormat                  ((AlpLocLocaleSettingChoice)8)
00077 
00079 #define AlpLocChoiceWeekStartDay                ((AlpLocLocaleSettingChoice)9)
00080 
00082 #define AlpLocChoiceTimeZone                    ((AlpLocLocaleSettingChoice)10)
00083 
00085 #define AlpLocChoiceNumberFormat                ((AlpLocLocaleSettingChoice)11)
00086 
00088 #define AlpLocChoiceCurrencyName                ((AlpLocLocaleSettingChoice)12)
00089 
00091 #define AlpLocChoiceCurrencySymbol              ((AlpLocLocaleSettingChoice)13)
00092 
00094 #define AlpLocChoiceUniqueCurrencySymbol        ((AlpLocLocaleSettingChoice)14)
00095 
00097 #define AlpLocChoiceCurrencyDecimalPlaces       ((AlpLocLocaleSettingChoice)15)
00098 
00100 #define AlpLocChoiceMeasurementSystem           ((AlpLocLocaleSettingChoice)16)
00101 
00103 #define AlpLocChoicePrimarySMSEncoding          ((AlpLocLocaleSettingChoice)18)
00104 
00106 #define AlpLocChoiceSecondarySMSEncoding        ((AlpLocLocaleSettingChoice)19)
00107 
00109 #define AlpLocChoicePrimaryEmailEncoding        ((AlpLocLocaleSettingChoice)20)
00110 
00112 #define AlpLocChoiceSecondaryEmailEncoding      ((AlpLocLocaleSettingChoice)21)
00113 
00115 #define AlpLocChoiceOutboundVObjectEncoding     ((AlpLocLocaleSettingChoice)22)
00116 
00118 #define AlpLocChoiceDayDateFormat               ((AlpLocLocaleSettingChoice)24)
00119 
00121 #define AlpLocChoiceDayLongDateFormat           ((AlpLocLocaleSettingChoice)25)
00122 
00124 #define AlpLocChoiceMonSingleLetterFormat       ((AlpLocLocaleSettingChoice)26)
00125 
00127 #define AlpLocChoiceTueSingleLetterFormat       ((AlpLocLocaleSettingChoice)27)
00128 
00130 #define AlpLocChoiceWedSingleLetterFormat       ((AlpLocLocaleSettingChoice)28)
00131 
00133 #define AlpLocChoiceThuSingleLetterFormat       ((AlpLocLocaleSettingChoice)29)
00134 
00136 #define AlpLocChoiceFriSingleLetterFormat       ((AlpLocLocaleSettingChoice)30)
00137 
00139 #define AlpLocChoiceSatSingleLetterFormat       ((AlpLocLocaleSettingChoice)31)
00140 
00142 #define AlpLocChoiceSunSingleLetterFormat       ((AlpLocLocaleSettingChoice)32)
00143 
00145 #define AlpLocChoiceJanSingleLetterFormat       ((AlpLocLocaleSettingChoice)33)
00146 
00148 #define AlpLocChoiceFebSingleLetterFormat       ((AlpLocLocaleSettingChoice)34)
00149 
00151 #define AlpLocChoiceMarSingleLetterFormat       ((AlpLocLocaleSettingChoice)35)
00152 
00154 #define AlpLocChoiceAprSingleLetterFormat       ((AlpLocLocaleSettingChoice)36)
00155 
00157 #define AlpLocChoiceMaySingleLetterFormat       ((AlpLocLocaleSettingChoice)37)
00158 
00160 #define AlpLocChoiceJunSingleLetterFormat       ((AlpLocLocaleSettingChoice)38)
00161 
00163 #define AlpLocChoiceJulSingleLetterFormat       ((AlpLocLocaleSettingChoice)39)
00164 
00166 #define AlpLocChoiceAugSingleLetterFormat       ((AlpLocLocaleSettingChoice)40)
00167 
00169 #define AlpLocChoiceSepSingleLetterFormat       ((AlpLocLocaleSettingChoice)41)
00170 
00172 #define AlpLocChoiceOctSingleLetterFormat       ((AlpLocLocaleSettingChoice)42)
00173 
00175 #define AlpLocChoiceNovSingleLetterFormat       ((AlpLocLocaleSettingChoice)43)
00176 
00178 #define AlpLocChoiceDecSingleLetterFormat       ((AlpLocLocaleSettingChoice)44)
00179 
00180 // ----------------------------------------------------------------------------
00181 // ROM locale function
00182 // ----------------------------------------------------------------------------
00183 
00193 alp_status_t alp_loc_get_rom_locale(AlpLocLocaleType * pLocale);
00194 
00195 // ----------------------------------------------------------------------------
00196 // system locale functions
00197 // ----------------------------------------------------------------------------
00198 
00209 alp_status_t alp_loc_get_system_locale(AlpLocLocaleType * pLocale);
00210 
00220 alp_status_t alp_loc_set_system_locale(AlpLocLocaleType * pLocale);
00221 
00233 alp_status_t alp_loc_get_system_locales(AlpLocLocaleType * pLocale, int * count);
00234 
00235 // ----------------------------------------------------------------------------
00236 // format locale functions
00237 // ----------------------------------------------------------------------------
00238 
00249 alp_status_t alp_loc_get_format_locale(AlpLocLocaleType * pLocale);
00250 
00260 alp_status_t alp_loc_set_format_locale(AlpLocLocaleType * pLocale);
00261 
00273 alp_status_t alp_loc_get_format_locales(AlpLocLocaleType * pLocale, int * count);
00274 
00275 // ----------------------------------------------------------------------------
00276 // locale settings functions
00277 // ----------------------------------------------------------------------------
00278 
00293 alp_status_t alp_loc_get_locale_setting(AlpLocLocaleType * pLocale, AlpLocLocaleSettingChoice nChoice, void * pValue, gint * nSize);
00294 
00307 alp_status_t alp_loc_set_locale_setting(AlpLocLocaleType * pLocale, AlpLocLocaleSettingChoice nChoice, void * pValue, gint nSize);
00308 
00309 // ----------------------------------------------------------------------------
00310 // locale name functions
00311 // ----------------------------------------------------------------------------
00312 
00324 alp_status_t alp_loc_get_language_name(AlpLocLocaleType * pLocale, gchar * pName, gint * nSize);
00325 
00337 alp_status_t alp_loc_get_country_name(AlpLocLocaleType * pLocale, gchar * pName, gint * nSize);
00338 
00350 alp_status_t alp_loc_get_posix_name(AlpLocLocaleType * pLocale, gchar * pName, gint * nSize);
00351 
00352 // ----------------------------------------------------------------------------
00353 // notification
00354 // ----------------------------------------------------------------------------
00355 
00357 #define ALP_NOTIFY_EVENT_LOCALE_SYSTEM_CHANGED "/alp/localemgr/system_changed"
00358 
00360 #define ALP_NOTIFY_EVENT_LOCALE_FORMAT_CHANGED "/alp/localemgr/format_changed"
00361 
00363 
00364 #ifdef __cplusplus
00365 } // extern "C"
00366 #endif
00367 
00368 #endif

Generated on Wed Jul 30 07:06:39 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.