X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=qmafw-gst-subtitles-renderer%2Funittests%2Fut_MafwGstRenderer%2FUt_MafwGstRenderer.h;fp=qmafw-gst-subtitles-renderer%2Funittests%2Fut_MafwGstRenderer%2FUt_MafwGstRenderer.h;h=f464304fa5b47aab1d54865350c8930602151288;hb=226d35244df85a27c332d3a3ded1b25b3c7f4951;hp=0000000000000000000000000000000000000000;hpb=57ba96e291a055f69dbfd4ae9f1ae2390e36986e;p=mafwsubrenderer diff --git a/qmafw-gst-subtitles-renderer/unittests/ut_MafwGstRenderer/Ut_MafwGstRenderer.h b/qmafw-gst-subtitles-renderer/unittests/ut_MafwGstRenderer/Ut_MafwGstRenderer.h new file mode 100644 index 0000000..f464304 --- /dev/null +++ b/qmafw-gst-subtitles-renderer/unittests/ut_MafwGstRenderer/Ut_MafwGstRenderer.h @@ -0,0 +1,102 @@ +/* + * This file is part of QMAFW + * + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights + * reserved. + * + * Contact: Visa Smolander + * + * This software, including documentation, is protected by copyright controlled + * by Nokia Corporation. All rights are reserved. Copying, including + * reproducing, storing, adapting or translating, any or all of this material + * requires the prior written consent of Nokia Corporation. This material also + * contains confidential information which may not be disclosed to others + * without the prior written consent of Nokia. + * + */ + +#ifndef UT_MAFWGSTRENDERER_H_ +#define UT_MAFWGSTRENDERER_H_ + +#include +#include +#include + +class MafwInternalRegistry; +class MafwGstRenderer; +class MafwRenderer; +class MafwStubHelper; +class MafwRendererPolicyStub; +class MafwMediaInfo; + +Q_DECLARE_METATYPE(QVariant) +Q_DECLARE_METATYPE(MafwError::Code) + +class Ut_MafwGstRenderer: public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testPlayURI(); + void testPlayPlaylistFile(); + void testStop(); + void testPause(); + void testResume(); + void testSeek(); + void testErrorCodeScenarios(); + void testErrorCodeScenarios_data(); + void testNextHint(); + void testPosition(); + void testProperty(); + void testProperty_data(); + void testPlaybackSpeedProperty(); + void testCallbacks(); + void testDefaultConfiguration(); + void testConfiguration(); + void testGetCurrentMediaInfo(); + void testGetCurrentMediaInfo_data(); + void testBlankingPreventer(); + void testPolicyPropertyHandler(); + void testMediaRouting(); + void testStamping(); + void testNetworkChangesWhenPlaying(); + void testNetworkChangesWithNoPlaylistFileUtil(); + void testNetworkChangesWhenPaused(); + void testNetworkChangesWhenPausedAndRendererStopped(); + void testNetworkChangesToInactiveAndPauseResumeRequested(); + void testNetworkChangesToInactiveAndPauseResumeRequested_data(); + void testNetworkChangesHaltStateDecay(); + void testNetworkChangesWithPlaylistURI(); + void testMmc(); + + /** + * @param error The status of the completed request. + * @param rndr Reference to instance of MafwRenderer invoked the callback slot + */ + void play_result(const MafwError& error, MafwRenderer& rndr); + + void positionChanged(uint position); + void positionError(const MafwError& error); + void media_info_result(const MafwMediaInfo& mediaInfo); + +protected Q_SLOTS: + void propertyChanged(const QString& name, const QVariant& value); + +private: + + MafwGstRenderer* m_renderer; + MafwStubHelper* m_stubHelper; + MafwRendererPolicyStub* m_rendererPolicy; + MafwError m_error; + uint m_position; + QVariant m_value; + QString m_name; + QList m_media_values; + int m_metadataCount; + ContextProperty *m_videoRoute; +}; + +#endif /*UT_MAFWGSTRENDERER_H_*/