xref: /haiku/src/libs/icon/message/MessageImporter.h (revision 16d5c24e533eb14b7b8a99ee9f3ec9ba66335b1e)
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 class BMessage;
19 class BPositionIO;
20 
21 namespace BPrivate {
22 namespace Icon {
23 
24 class Icon;
25 class PathContainer;
26 class ShapeContainer;
27 class StyleContainer;
28 
29 
30 #ifdef ICON_O_MATIC
31 class MessageImporter : public Importer {
32 #else
33 class MessageImporter {
34 #endif
35  public:
36 								MessageImporter();
37 	virtual						~MessageImporter();
38 
39 			status_t			Import(Icon* icon,
40 									   BPositionIO* stream);
41 
42  private:
43 			status_t			_ImportPaths(const BMessage* archive,
44 											 PathContainer* paths) const;
45 			status_t			_ImportStyles(const BMessage* archive,
46 											  StyleContainer* styles) const;
47 			status_t			_ImportShapes(const BMessage* archive,
48 											  PathContainer* paths,
49 											  StyleContainer* styles,
50 											  ShapeContainer* shapes) const;
51 };
52 
53 }	// namespace Icon
54 }	// namespace BPrivate
55 
56 #endif // MESSAGE_IMPORTER_H
57