diff -r dec420019252 -r 4f111d64a341 videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/stub/inc/stubsignalreceiver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/stub/inc/stubsignalreceiver.h Thu Apr 01 22:38:49 2010 +0300 @@ -0,0 +1,124 @@ +/** +* 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: stub signal receiver for testing VideoCollectionListener +* +*/ + +#ifndef __CSTUBSIGNALRECEIVER_H__ +#define __CSTUBSIGNALRECEIVER_H__ + +#include +#include +#include +#include +#include +#include + + +class StubSignalReceiver : public QObject +{ + Q_OBJECT + +public: + + /** + * contructor + */ + StubSignalReceiver(); + + /** + * destructor + */ + virtual ~StubSignalReceiver(); + + /** + * clears all members + */ + void resetLatestItems(); + + /** + * return mLatestPtr + */ + void* getLatestPointerAddr(); + + /** + * return mLatestItemId + */ + TMPXItemId getLatestItemId(); + + /** + * return mLatesListData + */ + QList& getLatestListData(); + + /** + * return mLatestInteger + */ + int getLatestIntegerData(); + +public slots: + + /** + * Saves provided address to mLatestPtr + */ + void newVideoListSlot(CMPXMediaArray* aVideoList); + + /** + * Saves provided address to mLatestPtr + */ + void videoListAppendedSlot(CMPXMediaArray* aVideoList); + + /** + * Saves provided address to mLatestPtr + */ + void newVideoAvailableSlot(CMPXMedia* aVideo); + + /** + * Saves provided integer to mLatestInt + */ + void videoDeletedSlot(TMPXItemId videoId); + + /** + * copies provided list data to mLatesListData + */ + void videoDeleteCompletedSlot(int count, QList *failedMediaIds); + + /** + * Saves provided integer to mLatestInt + */ + void videoDetailsCompletedSlot(TMPXItemId videoId); + +private: + /** + * Contains address of latest pointer passed to object + */ + void *mLatestPtr; + + /** + * contains latest integer value sent + */ + int mLatestInteger; + + /** + * contains value if the latest integer passed to object + */ + TMPXItemId mLatestItemId; + + /** + * contains contents of list received from signal + */ + QList mLatesListData; +}; + +#endif