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