2010-08-02 00:28:19 +04:00
|
|
|
/*
|
2012-04-15 21:04:02 +04:00
|
|
|
* Copyright 2010-2012, Haiku. All rights reserved.
|
2010-08-02 00:28:19 +04:00
|
|
|
* Distributed under the terms of the MIT license.
|
|
|
|
*/
|
|
|
|
#ifndef _MUTABLE_LOCALE_ROSTER_H_
|
|
|
|
#define _MUTABLE_LOCALE_ROSTER_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <Collator.h>
|
2010-10-24 16:57:55 +04:00
|
|
|
#include <FormattingConventions.h>
|
2010-08-02 00:28:19 +04:00
|
|
|
#include <image.h>
|
|
|
|
#include <Language.h>
|
|
|
|
#include <List.h>
|
2010-08-04 22:45:06 +04:00
|
|
|
#include <Locale.h>
|
2010-08-02 00:28:19 +04:00
|
|
|
#include <Locker.h>
|
|
|
|
#include <LocaleRoster.h>
|
|
|
|
#include <Message.h>
|
2010-10-20 01:36:44 +04:00
|
|
|
#include <Resources.h>
|
2010-08-02 00:28:19 +04:00
|
|
|
#include <TimeZone.h>
|
|
|
|
|
|
|
|
|
|
|
|
class BLocale;
|
|
|
|
class BCatalog;
|
2012-04-15 21:04:02 +04:00
|
|
|
class BCatalogData;
|
2010-08-02 00:28:19 +04:00
|
|
|
|
|
|
|
struct entry_ref;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
|
|
|
|
|
|
|
|
class MutableLocaleRoster : public BLocaleRoster {
|
|
|
|
public:
|
|
|
|
MutableLocaleRoster();
|
|
|
|
~MutableLocaleRoster();
|
|
|
|
|
2010-11-22 16:06:36 +03:00
|
|
|
static MutableLocaleRoster* Default();
|
|
|
|
|
2010-10-24 16:57:55 +04:00
|
|
|
status_t SetDefaultFormattingConventions(
|
|
|
|
const BFormattingConventions& conventions);
|
2010-08-02 00:28:19 +04:00
|
|
|
status_t SetDefaultTimeZone(const BTimeZone& zone);
|
|
|
|
|
|
|
|
status_t SetPreferredLanguages(const BMessage* message);
|
|
|
|
// the message contains one or more
|
|
|
|
// 'language'-string-fields which
|
|
|
|
// contain the language-name(s)
|
2012-04-15 21:04:02 +04:00
|
|
|
status_t SetFilesystemTranslationPreferred(
|
|
|
|
bool preferred);
|
2010-08-02 00:28:19 +04:00
|
|
|
|
2012-04-14 19:58:58 +04:00
|
|
|
status_t LoadSystemCatalog(BCatalog* catalog) const;
|
2010-08-02 00:28:19 +04:00
|
|
|
|
2012-04-15 21:04:02 +04:00
|
|
|
BCatalogData* LoadCatalog(const entry_ref& catalogOwner,
|
2010-08-02 00:28:19 +04:00
|
|
|
const char* language = NULL,
|
|
|
|
int32 fingerprint = 0) const;
|
2012-04-15 21:04:02 +04:00
|
|
|
status_t UnloadCatalog(BCatalogData* catalogData);
|
2010-08-02 00:28:19 +04:00
|
|
|
|
2012-04-15 21:04:02 +04:00
|
|
|
BCatalogData* CreateCatalog(const char* type,
|
2010-08-02 00:28:19 +04:00
|
|
|
const char* signature,
|
|
|
|
const char* language);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _MUTABLE_LOCALE_ROSTER_H_
|