Macro qtTrIdx() replaced by tr() and QT_TRANSLATE_NOOP()
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / unittests / ut_MafwGstRenderer / Ut_MafwGstRenderer.h
1 /*
2  * This file is part of QMAFW
3  *
4  * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights
5  * reserved.
6  *
7  * Contact: Visa Smolander <visa.smolander@nokia.com>
8  *
9  * This software, including documentation, is protected by copyright controlled
10  * by Nokia Corporation. All rights are reserved. Copying, including
11  * reproducing, storing, adapting or translating, any or all of this material
12  * requires the prior written consent of Nokia Corporation. This material also
13  * contains confidential information which may not be disclosed to others
14  * without the prior written consent of Nokia.
15  *
16  */
17
18 #ifndef UT_MAFWGSTRENDERER_H_
19 #define UT_MAFWGSTRENDERER_H_
20
21 #include <QtTest/QtTest>
22 #include <MafwError.h>
23 #include <contextsubscriber/contextproperty.h>
24
25 class MafwInternalRegistry;
26 class MafwGstRenderer;
27 class MafwRenderer;
28 class MafwStubHelper;
29 class MafwRendererPolicyStub;
30 class MafwMediaInfo;
31
32 Q_DECLARE_METATYPE(QVariant)
33 Q_DECLARE_METATYPE(MafwError::Code)
34
35 class Ut_MafwGstRenderer: public QObject
36 {
37     Q_OBJECT
38
39 private Q_SLOTS:
40     void initTestCase();
41     void cleanupTestCase();
42
43     void testPlayURI();
44     void testPlayPlaylistFile();
45     void testStop();
46     void testPause();
47     void testResume();
48     void testSeek();
49     void testErrorCodeScenarios();
50     void testErrorCodeScenarios_data();
51     void testNextHint();
52     void testPosition();
53     void testProperty();
54     void testProperty_data();
55     void testPlaybackSpeedProperty();
56     void testCallbacks();
57     void testDefaultConfiguration();
58     void testConfiguration();
59     void testGetCurrentMediaInfo();
60     void testGetCurrentMediaInfo_data();
61     void testBlankingPreventer();
62     void testPolicyPropertyHandler();
63     void testMediaRouting();
64     void testStamping();
65     void testNetworkChangesWhenPlaying();
66     void testNetworkChangesWithNoPlaylistFileUtil();
67     void testNetworkChangesWhenPaused();
68     void testNetworkChangesWhenPausedAndRendererStopped();
69     void testNetworkChangesToInactiveAndPauseResumeRequested();
70     void testNetworkChangesToInactiveAndPauseResumeRequested_data();
71     void testNetworkChangesHaltStateDecay();
72     void testNetworkChangesWithPlaylistURI();
73     void testMmc();
74
75     /**
76      * @param error The status of the completed request.
77      * @param rndr Reference to instance of MafwRenderer invoked the callback slot
78      */
79     void play_result(const MafwError& error, MafwRenderer& rndr);
80
81     void positionChanged(uint position);
82     void positionError(const MafwError& error);
83     void media_info_result(const MafwMediaInfo& mediaInfo);
84
85 protected Q_SLOTS:
86     void propertyChanged(const QString& name, const QVariant& value);
87
88 private:
89
90     MafwGstRenderer* m_renderer;
91     MafwStubHelper* m_stubHelper;
92     MafwRendererPolicyStub* m_rendererPolicy;
93     MafwError m_error;
94     uint m_position;
95     QVariant m_value;
96     QString m_name;
97     QList<QVariant> m_media_values;
98     int m_metadataCount;
99     ContextProperty *m_videoRoute;
100 };
101
102 #endif /*UT_MAFWGSTRENDERER_H_*/