mpengine/src/mpmpxharvesterframeworkwrapper.cpp
changeset 22 ecf06a08d4d9
child 29 8192e5b5c935
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mpengine/src/mpmpxharvesterframeworkwrapper.cpp	Mon May 03 12:29:20 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Wrapper for mpx harvester framework utilities.
+*
+*/
+
+#include "mpmpxharvesterframeworkwrapper.h"
+#include "mpmpxharvesterframeworkwrapper_p.h"
+
+/*!
+    \class MpMpxHarvesterFrameworkWrapper
+    \brief Wrapper for mpx framework utilities.
+
+    MPX harvester framework wrapper provides Qt style interface to the MPX harvester framework
+    utilities. Its implementation is hidden using private class data pattern.
+*/
+
+/*!
+    \fn void scanStarted()
+
+    This signal is emitted when scan operation is started.
+
+ */
+
+/*!
+    \fn void scanEnded( int count, int error )
+
+    This signal is emitted when scan operation ends. It indicates the number
+    of songs added and whether there was an error.
+
+ */
+
+/*!
+    \fn void scanCountChanged( int count )
+
+    This signal is emitted when scan count is updated.
+
+ */
+
+/*!
+    \fn void diskEvent( MpxDiskEvent event )
+
+    This signal is emitted when a disk event is received from MPX framework.
+
+ */
+
+ /*!
+     \fn void usbEvent( MpxUsbEvent event )
+
+     This signal is emitted when an USB event is received from MPX framework.
+
+ */
+
+/*!
+ Constructs the utility wrapper.
+ */
+MpMpxHarvesterFrameworkWrapper::MpMpxHarvesterFrameworkWrapper( MpCommon::MpViewMode viewMode, TUid hostUid, QObject *parent )
+    : QObject( parent )
+{
+    d_ptr = new MpMpxHarvesterFrameworkWrapperPrivate( this );
+    d_ptr->init( viewMode, hostUid );
+}
+
+/*!
+ Destructs the utility wrapper.
+ */
+MpMpxHarvesterFrameworkWrapper::~MpMpxHarvesterFrameworkWrapper()
+{
+    delete d_ptr;
+}
+
+/*!
+ Initiates song scanning.
+ */
+void MpMpxHarvesterFrameworkWrapper::scan()
+{
+    d_ptr->scan();
+}
+
+/*!
+ Cancels ongoing song scanning.
+ */
+void MpMpxHarvesterFrameworkWrapper::cancelScan()
+{
+    d_ptr->cancelScan();
+}
+
+/*!
+ Request Harvester to check if there are any system events active.
+ */
+void MpMpxHarvesterFrameworkWrapper::checkForSystemEvents()
+{
+    d_ptr->checkForSystemEvents();
+}
+