email_plat/nmail_client_api/nmapifolderlisting.h
changeset 23 2dc6caa42ec3
parent 20 ecc8def7944a
child 49 00c7ae862740
--- a/email_plat/nmail_client_api/nmapifolderlisting.h	Mon May 03 12:23:15 2010 +0300
+++ b/email_plat/nmail_client_api/nmapifolderlisting.h	Fri May 14 15:41:10 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0"
@@ -18,88 +18,85 @@
 #ifndef NMAPIFOLDERLISTING_H_
 #define NMAPIFOLDERLISTING_H_
 
-#include <QObject>
+#include <nmapimessagetask.h>
+#include <nmapidef.h>
 
-#include "nmapimessagetask.h"
-#include "nmapimailbox.h"
-#include "nmenginedef.h"
-#include "nmapifolder.h"
-
-class NmEngine;
+class NmApiEngine;
 
 namespace EmailClientApi
 {
 
-class NmFolderListingPrivate;
-
+class NmApiFolderListingPrivate;
+class NmApiMailbox;
+class NmApiFolder;
 /*!
- * \class Class for creating list of all folders
+   \class Class for creating list of all folders
  */
-class NMENGINE_EXPORT NmFolderListing : public NmMessageTask
+class NMAPI_EXPORT NmApiFolderListing : public NmApiMessageTask
 {
     Q_OBJECT
 public:
     /*!
-     * Constructor of class. It set start values.
+       Constructor of class. It set start values.
      */
-    NmFolderListing( QObject *parent, const quint64 &nmMailboxId );
+    NmApiFolderListing(QObject *parent, const quint64 &nmMailboxId);
     /*!
-     * Destructor of class. It release engine to be safe if manual releasing won't work.
+       Destructor of class. It release engine to be safe if manual releasing won't work.
      */
-    ~NmFolderListing();
+    ~NmApiFolderListing();
 
     enum {FolderListingFailed = -1};
 
     /*! 
-     * \brief Returns results after foldersListed signal is received.
-     * 
-     *  Caller gets ownership of messages. Returns true if results were available.
-     *  It clears list of folders after be called.
-     *  It also at start clear inputlist of NmFolder.
+       \brief Returns results after foldersListed signal is received.
+       
+        Before calling this method, cancel and start should be called, 
+        because after second call it returns empty list..
+        It also at start clear inputlist of NmFolder.
      */
-    bool getFolders(QList<EmailClientApi::NmFolder> &folders);
+    bool getFolders(QList<EmailClientApi::NmApiFolder> &folders);
 
     /*!
-     * \brief Return info if listing is running
+       \brief Returns info if listing is running
      */
     bool isRunning() const;
 
     signals:
     /*!
-     * emitted when listing is available, count is number of folders found
-     * or FolderListingFailed if listing failed
+       emitted when listing is available, count is number of folders found
+       or FolderListingFailed if listing failed
      */
     void foldersListed(qint32 count);
 
 public slots:
     /*!
-     * \brief Starts gathering folders list.
-     * 
-     * In first turn it will get whole folderlist. 
-     * \todo After that it will wait for folder events.
-     * If start works, it do nothing.
-     * 
-     * To asynchronous operation ce be used \sa QTimer::singleShot on this method.
-     * Example:
-     * <code> 
-     * QTimer::singleShot(0,nmFolderListing,SLOT(start());
-     * </code>
-     * 
+       \brief Starts gathering folders list.
+       
+       In first turn it will get whole folderlist. 
+       \todo After that it will wait for folder events.
+       If start works, it do nothing.
+       
+       To asynchronous operation ce be used \sa QTimer::singleShot on this method.
+       Example:
+       <code> 
+       QTimer::singleShot(0,nmFolderListing,SLOT(start());
+       </code>
+       
      */
-    virtual bool start();
+    bool start();
 
     /*!
-     * \brief Stop gathering folder list.
-     * 
-     * In first it change state of listing.
-     * Then it release engine.
-     * On end it clears list of folders and emits \sa NmMessageTask::canceled() signal.
+       \brief Stops gathering folder list.
+       
+       In first it change state of listing.
+       Then it release engine.
+       On end it clears list of folders and emits \sa NmApiMessageTask::canceled() signal.
      */
-    virtual void cancel();
+    void cancel();
 
 private:
-    NmFolderListingPrivate* mFolderListing;
+    NmApiFolderListingPrivate *mFolderListing;
 };
 }
 
-#endif /* NMFOLDERLISTING_H_ */
+#endif /* NMAPIFOLDERLISTING_H_ */