xref: /haiku/src/libs/icon/message/MessageImporter.h (revision e1c4049fed1047bdb957b0529e1921e97ef94770)
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 template <class Type> class Container;
29 class Icon;
30 class PathContainer;
31 class Shape;
32 class Style;
33 class VectorPath;
34 
35 
36 #ifdef ICON_O_MATIC
37 class MessageImporter : public Importer {
38 #else
39 class MessageImporter {
40 #endif
41  public:
42 								MessageImporter();
43 	virtual						~MessageImporter();
44 
45 			status_t			Import(Icon* icon,
46 									   BPositionIO* stream);
47 
48  private:
49 			status_t			_ImportPaths(const BMessage* archive,
50 											 Container<VectorPath>* paths) const;
51 			status_t			_ImportStyles(const BMessage* archive,
52 											  Container<Style>* styles) const;
53 			status_t			_ImportShapes(const BMessage* archive,
54 											  Container<VectorPath>* paths,
55 											  Container<Style>* styles,
56 											  Container<Shape>* shapes) const;
57 };
58 
59 
60 _END_ICON_NAMESPACE
61 
62 
63 #endif // MESSAGE_IMPORTER_H
64