xref: /haiku/src/apps/icon-o-matic/document/savers/NativeSaver.cpp (revision 239222b2369c39dc52df52b0a7cdd6cc0a91bc92)
1 /*
2  * Copyright 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 #include "NativeSaver.h"
9 
10 #include "FlatIconFormat.h"
11 #include "MessageExporter.h"
12 
13 // constructor
14 NativeSaver::NativeSaver(const entry_ref& ref)
15 	: fAttrSaver(ref, kVectorAttrNodeName),
16 	  fFileSaver(new MessageExporter(), ref)
17 {
18 }
19 
20 // destructor
21 NativeSaver::~NativeSaver()
22 {
23 }
24 
25 // Save
26 status_t
27 NativeSaver::Save(Document* document)
28 {
29 	status_t ret = fFileSaver.Save(document);
30 	if (ret < B_OK)
31 		return ret;
32 	return fAttrSaver.Save(document);
33 }
34 
35