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