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