btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / locale / EditableCatalog.h
blob7842610ca30abaee3bf8ca403b0476276b0108cb
1 /*
2 * Copyright 2003-2012, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _EDITABLE_CATALOG_H_
6 #define _EDITABLE_CATALOG_H_
9 #include <Catalog.h>
12 class BMessage;
13 struct entry_ref;
16 namespace BPrivate {
19 class EditableCatalog : public BCatalog {
20 public:
21 EditableCatalog(const char* type,
22 const char* signature,
23 const char* language);
24 virtual ~EditableCatalog();
26 status_t SetString(const char* string,
27 const char* translated,
28 const char* context = NULL,
29 const char* comment = NULL);
30 status_t SetString(int32 id, const char* translated);
32 bool CanWriteData() const;
33 status_t SetData(const char* name, BMessage* msg);
34 status_t SetData(uint32 id, BMessage* msg);
36 status_t ReadFromFile(const char* path = NULL);
37 status_t ReadFromAttribute(
38 const entry_ref& appOrAddOnRef);
39 status_t ReadFromResource(
40 const entry_ref& appOrAddOnRef);
41 status_t WriteToFile(const char* path = NULL);
42 status_t WriteToAttribute(
43 const entry_ref& appOrAddOnRef);
44 status_t WriteToResource(
45 const entry_ref& appOrAddOnRef);
47 void MakeEmpty();
49 BCatalogData* CatalogData();
51 private:
52 EditableCatalog();
53 EditableCatalog(const EditableCatalog& other);
54 const EditableCatalog& operator=(const EditableCatalog& other);
55 // hide assignment, default-, and
56 // copy-constructor
60 } // namespace BPrivate
63 #endif /* _EDITABLE_CATALOG_H_ */