1 /* 2 * Copyright 2006, 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 9 #ifndef FLAT_ICON_IMPORTER_H 10 #define FLAT_ICON_IMPORTER_H 11 12 #include <SupportDefs.h> 13 14 class BMessage; 15 class BPositionIO; 16 class Icon; 17 class LittleEndianBuffer; 18 class PathContainer; 19 class ShapeContainer; 20 class StyleContainer; 21 22 class FlatIconImporter { 23 public: 24 FlatIconImporter(); 25 virtual ~FlatIconImporter(); 26 27 // Importer interface (Importer base not yet written) 28 virtual status_t Import(Icon* icon, 29 BPositionIO* stream); 30 31 // FlatIconImporter 32 status_t Import(Icon* icon, 33 uint8* buffer, size_t size); 34 35 private: 36 status_t _ParseSections(LittleEndianBuffer& buffer, 37 Icon* icon); 38 39 status_t _ParseStyles(LittleEndianBuffer& buffer, 40 StyleContainer* styles); 41 status_t _ParsePaths(LittleEndianBuffer& buffer, 42 PathContainer* paths); 43 status_t _ParseShapes(LittleEndianBuffer& buffer, 44 StyleContainer* styles, 45 PathContainer* paths, 46 ShapeContainer* shapes); 47 }; 48 49 #endif // FLAT_ICON_IMPORTER_H 50