1c3ac87e8SOliver Tappe #ifndef _LOCALE_ROSTER_H_ 2c3ac87e8SOliver Tappe #define _LOCALE_ROSTER_H_ 3c3ac87e8SOliver Tappe 475f15221SOliver Tappe 5c3ac87e8SOliver Tappe #include <String.h> 6c3ac87e8SOliver Tappe 775f15221SOliver Tappe 8c3ac87e8SOliver Tappe class BLanguage; 9c3ac87e8SOliver Tappe class BLocale; 10c3ac87e8SOliver Tappe class BCollator; 11c3ac87e8SOliver Tappe class BCountry; 12c3ac87e8SOliver Tappe class BCatalog; 13c3ac87e8SOliver Tappe class BCatalogAddOn; 14*f9a80fecSAxel Dörfler class BMessage; 15c3ac87e8SOliver Tappe 1675f15221SOliver Tappe struct entry_ref; 1775f15221SOliver Tappe 18c3ac87e8SOliver Tappe namespace BPrivate { 19c3ac87e8SOliver Tappe class EditableCatalog; 20c3ac87e8SOliver Tappe }; 21c3ac87e8SOliver Tappe 22c3ac87e8SOliver Tappe enum { 23c3ac87e8SOliver Tappe B_LOCALE_CHANGED = '_LCC', 24c3ac87e8SOliver Tappe }; 25c3ac87e8SOliver Tappe 2675f15221SOliver Tappe 27723383c0SOliver Tappe class BLocaleRoster { 28c3ac87e8SOliver Tappe 29c3ac87e8SOliver Tappe public: 30c3ac87e8SOliver Tappe BLocaleRoster(); 31c3ac87e8SOliver Tappe ~BLocaleRoster(); 32c3ac87e8SOliver Tappe 33c3ac87e8SOliver Tappe // status_t GetCatalog(BLocale *,const char *mimeType, BCatalog *catalog); 34c3ac87e8SOliver Tappe // status_t GetCatalog(const char *mimeType, BCatalog *catalog); 35c3ac87e8SOliver Tappe // status_t SetCatalog(BLocale *,const char *mimeType, BCatalog *catalog); 36c3ac87e8SOliver Tappe 37c3ac87e8SOliver Tappe // status_t GetLocaleFor(const char *langCode, const char *countryCode); 38c3ac87e8SOliver Tappe 39c3ac87e8SOliver Tappe status_t GetDefaultCollator(BCollator **) const; 40c3ac87e8SOliver Tappe status_t GetDefaultLanguage(BLanguage **) const; 41c3ac87e8SOliver Tappe status_t GetDefaultCountry(BCountry **) const; 4275f15221SOliver Tappe void SetDefaultCountry(BCountry *) const; 43c3ac87e8SOliver Tappe 44c3ac87e8SOliver Tappe status_t GetPreferredLanguages(BMessage *) const; 45c3ac87e8SOliver Tappe status_t SetPreferredLanguages(BMessage *); 46c3ac87e8SOliver Tappe // the message contains one or more 'language'-string-fields 47c3ac87e8SOliver Tappe // which contain the language-name(s) 48c3ac87e8SOliver Tappe 49c3ac87e8SOliver Tappe status_t GetInstalledLanguages(BMessage *) const; 50c3ac87e8SOliver Tappe // the message contains one or more 'language'-string-fields 51c3ac87e8SOliver Tappe // which contain the language-name(s) 52c3ac87e8SOliver Tappe 5375f15221SOliver Tappe status_t GetInstalledCatalogs(BMessage *, const char* sigPattern = NULL, 5475f15221SOliver Tappe const char* langPattern = NULL, int32 fingerprint = 0) const; 55c3ac87e8SOliver Tappe // the message contains... 56c3ac87e8SOliver Tappe 57c3ac87e8SOliver Tappe static const char *kCatLangAttr; 58c3ac87e8SOliver Tappe static const char *kCatSigAttr; 59c3ac87e8SOliver Tappe static const char *kCatFingerprintAttr; 6075f15221SOliver Tappe 61c3ac87e8SOliver Tappe static const char *kCatManagerMimeType; 62c3ac87e8SOliver Tappe static const char *kCatEditorMimeType; 6375f15221SOliver Tappe 64c3ac87e8SOliver Tappe static const char *kEmbeddedCatAttr; 65c3ac87e8SOliver Tappe static int32 kEmbeddedCatResId; 66c3ac87e8SOliver Tappe 67c3ac87e8SOliver Tappe private: 68c3ac87e8SOliver Tappe 69c3ac87e8SOliver Tappe BCatalogAddOn* LoadCatalog(const char *signature, 7075f15221SOliver Tappe const char *language = NULL, int32 fingerprint = 0); 71c3ac87e8SOliver Tappe BCatalogAddOn* LoadEmbeddedCatalog(entry_ref *appOrAddOnRef); 72c3ac87e8SOliver Tappe status_t UnloadCatalog(BCatalogAddOn *addOn); 7375f15221SOliver Tappe 74c3ac87e8SOliver Tappe BCatalogAddOn* CreateCatalog(const char *type, 7575f15221SOliver Tappe const char *signature, const char *language); 76c3ac87e8SOliver Tappe 77c3ac87e8SOliver Tappe friend class BCatalog; 78c3ac87e8SOliver Tappe friend class BPrivate::EditableCatalog; 79c3ac87e8SOliver Tappe friend status_t get_add_on_catalog(BCatalog*, const char *); 80c3ac87e8SOliver Tappe }; 81c3ac87e8SOliver Tappe 82c3ac87e8SOliver Tappe #endif /* _LOCALE_ROSTER_H_ */ 83