2 * Copyright 2009, Adrien Destugues, pulkomandy@gmail.com.
3 * Distributed under the terms of the MIT License.
5 #ifndef _PLAINTEXT_CATALOG_H_
6 #define _PLAINTEXT_CATALOG_H_
9 #include <HashMapCatalog.h>
19 class PlainTextCatalog
: public HashMapCatalog
{
21 PlainTextCatalog(const entry_ref
& owner
, const char *language
,
23 // constructor for normal use
24 PlainTextCatalog(const char *path
, const char *signature
,
25 const char *language
);
26 // constructor for editor-app
30 void SetSignature(const entry_ref
&catalogOwner
);
32 // implementation for editor-interface:
33 status_t
ReadFromFile(const char *path
= NULL
);
34 status_t
WriteToFile(const char *path
= NULL
);
36 static BCatalogData
*Instantiate(const entry_ref
&signature
,
37 const char *language
, uint32 fingerprint
);
39 static const char *kCatMimeType
;
42 void UpdateAttributes(BFile
& catalogFile
);
43 void UpdateAttributes(const char* path
);
45 mutable BString fPath
;
49 } // namespace BPrivate
52 #endif /* _PLAINTEXT_CATALOG_H_ */