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 21class BMessage; 22class BPositionIO; 23 24 25_BEGIN_ICON_NAMESPACE 26 27 28template <class Type> class Container; 29class Icon; 30class PathContainer; 31class Shape; 32class Style; 33class VectorPath; 34 35 36#ifdef ICON_O_MATIC 37class MessageImporter : public Importer { 38#else 39class 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