vfs: check userland buffers before reading them.
[haiku.git] / src / libs / icon / message / MessageImporter.h
blob5696740d11945049201874f516eab3c3d5cb4b2f
1 /*
2 * Copyright 2006-2007, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stephan Aßmus <superstippi@gmx.de>
7 */
8 #ifndef MESSAGE_IMPORTER_H
9 #define MESSAGE_IMPORTER_H
12 #ifdef ICON_O_MATIC
13 # include "Importer.h"
14 #else
15 # include <SupportDefs.h>
16 #endif
18 #include "IconBuild.h"
21 class BMessage;
22 class BPositionIO;
25 _BEGIN_ICON_NAMESPACE
28 class Icon;
29 class PathContainer;
30 class ShapeContainer;
31 class StyleContainer;
34 #ifdef ICON_O_MATIC
35 class MessageImporter : public Importer {
36 #else
37 class MessageImporter {
38 #endif
39 public:
40 MessageImporter();
41 virtual ~MessageImporter();
43 status_t Import(Icon* icon,
44 BPositionIO* stream);
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;
58 _END_ICON_NAMESPACE
61 #endif // MESSAGE_IMPORTER_H