2 * Copyright 2003-2012, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
5 #ifndef _EDITABLE_CATALOG_H_
6 #define _EDITABLE_CATALOG_H_
19 class EditableCatalog
: public BCatalog
{
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
);
49 BCatalogData
* CatalogData();
53 EditableCatalog(const EditableCatalog
& other
);
54 const EditableCatalog
& operator=(const EditableCatalog
& other
);
55 // hide assignment, default-, and
60 } // namespace BPrivate
63 #endif /* _EDITABLE_CATALOG_H_ */