libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / apps / icon-o-matic / import_export / Exporter.h
blob10390b90022fc29cd5d640199be66476b04abed7
1 /*
2 * Copyright 2006, 2007, 2011, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5 #ifndef EXPORTER_H
6 #define EXPORTER_H
9 #include <Entry.h>
10 #include <OS.h>
12 #include "IconBuild.h"
15 class BPositionIO;
16 class Document;
19 _BEGIN_ICON_NAMESPACE
20 class Icon;
21 _END_ICON_NAMESPACE
23 _USING_ICON_NAMESPACE
26 class Exporter {
27 public:
28 Exporter();
29 virtual ~Exporter();
31 status_t Export(Document* document,
32 const entry_ref& ref);
34 virtual status_t Export(const Icon* icon,
35 BPositionIO* stream) = 0;
37 virtual const char* MIMEType() = 0;
39 void SetSelfDestroy(bool selfDestroy);
41 void WaitForExportThread();
43 private:
44 static int32 _ExportThreadEntry(void* cookie);
45 int32 _ExportThread();
46 status_t _Export(const Icon* icon,
47 const entry_ref* docRef);
49 Document* fDocument;
50 Icon* fClonedIcon;
51 entry_ref fRef;
52 thread_id fExportThread;
53 bool fSelfDestroy;
56 #endif // EXPORTER_H