xref: /haiku/src/libs/icon/message/MessageImporter.h (revision 837b16251d4b2b6249ebcaa19bb319cbe82c6126)
1 /*
2  * Copyright 2006-2007, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 #ifndef MESSAGE_IMPORTER_H
9 #define MESSAGE_IMPORTER_H
10 
11 
12 #ifdef ICON_O_MATIC
13 #	include "Importer.h"
14 #else
15 #	include <SupportDefs.h>
16 #endif
17 
18 #include "IconBuild.h"
19 
20 
21 class BMessage;
22 class BPositionIO;
23 
24 
25 _BEGIN_ICON_NAMESPACE
26 
27 
28 class Icon;
29 class PathContainer;
30 class ShapeContainer;
31 class StyleContainer;
32 
33 
34 #ifdef ICON_O_MATIC
35 class MessageImporter : public Importer {
36 #else
37 class MessageImporter {
38 #endif
39  public:
40 								MessageImporter();
41 	virtual						~MessageImporter();
42 
43 			status_t			Import(Icon* icon,
44 									   BPositionIO* stream);
45 
46  private:
47 			status_t			_ImportPaths(const BMessage* archive,
48 											 PathContainer* paths) const;
49 			status_t			_ImportStyles(const BMessage* archive,
50 											  StyleContainer* styles) const;
51 			status_t			_ImportShapes(const BMessage* archive,
52 											  PathContainer* paths,
53 											  StyleContainer* styles,
54 											  ShapeContainer* shapes) const;
55 };
56 
57 
58 _END_ICON_NAMESPACE
59 
60 
61 #endif // MESSAGE_IMPORTER_H
62