|
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: Header file for share player. |
|
15 * |
|
16 */ |
|
17 |
1 #ifdef SHARE_FUNC_ENABLED |
18 #ifdef SHARE_FUNC_ENABLED |
2 #ifndef MPDETAILSSHAREDIALOG_H |
19 #ifndef MPDETAILSSHAREDIALOG_H |
3 #define MPDETAILSSHAREDIALOG_H |
20 #define MPDETAILSSHAREDIALOG_H |
4 |
21 |
5 #include <HbDialog> |
22 #include <HbDialog> |
|
23 #include <QList> |
|
24 #include <QSSLError> |
6 #include "mpsharedata.h" |
25 #include "mpsharedata.h" |
7 |
26 |
8 class QGraphicsWebView; |
27 class QGraphicsWebView; |
9 class QNetworkAccessManager; |
28 class QNetworkAccessManager; |
|
29 class QNetworkReply; |
|
30 class MpShareWebView; |
10 class MpSongData; |
31 class MpSongData; |
|
32 class HbProgressDialog; |
11 |
33 |
12 /*! |
34 /*! |
13 Implements Share Player dialog for music player details view. |
35 Implements Share Player dialog for music player details view. |
14 First, construct an instance of the class, then call initialize method. |
36 First, construct an instance of the class, then call initialize method. |
15 */ |
37 */ |
20 public: |
42 public: |
21 MpDetailsShareDialog(); |
43 MpDetailsShareDialog(); |
22 |
44 |
23 /*! |
45 /*! |
24 Initializes an instance of the class with given MpSongData. |
46 Initializes an instance of the class with given MpSongData. |
|
47 Translation for "unknown" string is passed so that the share |
|
48 dialog can display "unknown" if artist or title are not set. |
25 MpSongData object ownership is not transferred, |
49 MpSongData object ownership is not transferred, |
26 Music Player Engine retains the ownership. |
50 Music Player Engine retains the ownership. |
27 */ |
51 */ |
28 void initialize( MpSongData* aSongData ); |
52 void initialize( MpSongData* aSongData, const QString& aUnknownTr ); |
29 virtual ~MpDetailsShareDialog(); |
53 virtual ~MpDetailsShareDialog(); |
|
54 void cachePublishingPlayerFiles(); |
30 void logoutPlayer(); |
55 void logoutPlayer(); |
|
56 bool isInitialized() const; |
31 |
57 |
32 public slots: |
58 public slots: |
33 void addContext(); |
59 void addContext(); |
34 void updateSharedData(); |
60 void updateSharedData(); |
35 void onIndexLoad( bool ok ); |
61 void onIndexLoad( bool ok ); |
36 void debugJs( QString s ); |
62 void debugJs( QString s ); |
37 void errorHandler( QString error, QString message ); |
63 void errorHandler( QString aError, QString aMessage ); |
38 void clearCache(); |
64 void clearCache(); |
|
65 void showWindow(); |
|
66 void showProgressDialog(); |
|
67 void handleRequestSSLErrors( QNetworkReply* aReply, const QList< QSslError >& aErrors ); |
|
68 void handleRequestFinished( QNetworkReply* aReply ); |
39 |
69 |
40 signals: |
70 signals: |
41 void closeShareDialog(); |
71 void closeShareDialog(); |
42 |
72 |
43 private: |
73 private: |
44 void initShareData( MpSongData* aSongData ); |
74 void initShareData( MpSongData* aSongData, const QString& aUnknownTr ); |
|
75 void initLanguage(); |
45 void initNetworkAccessManager(); |
76 void initNetworkAccessManager(); |
46 void initWebView(); |
77 void initWebView(); |
47 void initSignalSlots(); |
78 void initSignalSlots(); |
48 bool initUser(); |
79 bool initUser(); |
49 |
80 |
50 private: |
81 private: |
51 MpShareData mShareData; |
82 MpShareData mShareData; |
52 QGraphicsWebView* mShareWebView; // Owned by HbDialog |
83 MpShareWebView* mShareWebView; // Owned by HbDialog |
53 QNetworkAccessManager* mShareNetAccMan; // Owned |
84 QNetworkAccessManager* mShareNetAccMan; // Owned |
|
85 HbProgressDialog* mProgressbar; // Owned |
|
86 bool mIsInitialized; |
54 }; |
87 }; |
55 |
88 |
56 #endif // MPDETAILSSHAREDIALOG_H |
89 #endif // MPDETAILSSHAREDIALOG_H |
57 #endif // SHARE_FUNC_ENABLED |
90 #endif // SHARE_FUNC_ENABLED |