From 1c4001e299cfb71bf04b3eb5fbb10a6117e00901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 4 Apr 2011 09:19:48 +0000 Subject: [PATCH] * Code style cleanup. * Make WaitForExportThread() available. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41177 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../document/savers/SimpleFileSaver.cpp | 21 ++++++++++++------- .../document/savers/SimpleFileSaver.h | 17 ++++++++------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/apps/icon-o-matic/document/savers/SimpleFileSaver.cpp b/src/apps/icon-o-matic/document/savers/SimpleFileSaver.cpp index 7b50e91976..40309ffa53 100644 --- a/src/apps/icon-o-matic/document/savers/SimpleFileSaver.cpp +++ b/src/apps/icon-o-matic/document/savers/SimpleFileSaver.cpp @@ -1,15 +1,14 @@ /* - * Copyright 2006-2007, Haiku. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * Stephan Aßmus + * Copyright 2006-2007, 2011, Stephan Aßmus . + * All rights reserved. Distributed under the terms of the MIT License. */ + + #include "SimpleFileSaver.h" #include "Exporter.h" -// constructor + SimpleFileSaver::SimpleFileSaver(Exporter* exporter, const entry_ref& ref) : FileSaver(ref), @@ -18,16 +17,22 @@ SimpleFileSaver::SimpleFileSaver(Exporter* exporter, fExporter->SetSelfDestroy(false); } -// destructor + SimpleFileSaver::~SimpleFileSaver() { delete fExporter; } -// Save + status_t SimpleFileSaver::Save(Document* document) { return fExporter->Export(document, fRef); } + +void +SimpleFileSaver::WaitForExportThread() +{ + fExporter->WaitForExportThread(); +} diff --git a/src/apps/icon-o-matic/document/savers/SimpleFileSaver.h b/src/apps/icon-o-matic/document/savers/SimpleFileSaver.h index 245245fb1f..ba6f623bc8 100644 --- a/src/apps/icon-o-matic/document/savers/SimpleFileSaver.h +++ b/src/apps/icon-o-matic/document/savers/SimpleFileSaver.h @@ -1,27 +1,30 @@ /* - * Copyright 2006-2007, Haiku. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * Stephan Aßmus + * Copyright 2006-2007, 2011, Stephan Aßmus . + * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef SIMPLE_FILE_SAVER_H #define SIMPLE_FILE_SAVER_H + #include "FileSaver.h" + class Exporter; + class SimpleFileSaver : public FileSaver { - public: +public: SimpleFileSaver(Exporter* exporter, const entry_ref& ref); virtual ~SimpleFileSaver(); virtual status_t Save(Document* document); - private: + void WaitForExportThread(); + +private: Exporter* fExporter; }; + #endif // SIMPLE_FILE_SAVER_H