|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: VideoServiceUriFetch class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __VIDEOSERVICESURIFETCH_H__ |
|
19 #define __VIDEOSERVICESURIFETCH_H__ |
|
20 |
|
21 //INCLUDES |
|
22 #include <xqserviceprovider.h> |
|
23 #include <QStringList> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class VideoServices; |
|
27 |
|
28 class VideoServiceUriFetch : public XQServiceProvider |
|
29 { |
|
30 |
|
31 /** |
|
32 * define to be able to use signals and slots |
|
33 */ |
|
34 Q_OBJECT |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * contructor |
|
40 */ |
|
41 VideoServiceUriFetch( VideoServices *parent = 0 ); |
|
42 |
|
43 /** |
|
44 * destructor |
|
45 */ |
|
46 ~VideoServiceUriFetch(); |
|
47 |
|
48 /** |
|
49 * Returns service active status |
|
50 * |
|
51 * @return bool true if active, false if not active |
|
52 * |
|
53 */ |
|
54 bool isActive(); |
|
55 |
|
56 /** |
|
57 * Completes the service |
|
58 * |
|
59 * @param fileList list of file URIs |
|
60 * |
|
61 */ |
|
62 void complete(QStringList filesList); |
|
63 |
|
64 /** |
|
65 * Returns the context title set by service requestee |
|
66 * |
|
67 * @return QString the title |
|
68 * |
|
69 */ |
|
70 QString contextTitle() const; |
|
71 |
|
72 public slots: // for QTHighway to notify provider about request |
|
73 /* |
|
74 * Client can use this method launch video URI fetching |
|
75 * |
|
76 * @param title title to be set |
|
77 * |
|
78 */ |
|
79 void fetch(const QString& title); |
|
80 |
|
81 public slots: // for provider to notify client |
|
82 void fetchFailed( int errorCode ); |
|
83 |
|
84 private: |
|
85 void doComplete( QStringList filesList); |
|
86 |
|
87 private: |
|
88 /* |
|
89 * The request index |
|
90 */ |
|
91 int mRequestIndex; |
|
92 |
|
93 /* |
|
94 * Pointer to owning VideoServices |
|
95 */ |
|
96 VideoServices* mServiceApp; |
|
97 |
|
98 /* |
|
99 * The title requested by the service user |
|
100 */ |
|
101 QString mTitle; |
|
102 }; |
|
103 |
|
104 #endif //__VIDEOSERVICESURIFETCH_H__ |