dlnasrv_exampleapp/inc/exampleappengine.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
       
     1 /*
       
     2 * Copyright (c) 2010 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:
       
    15 *
       
    16 */
       
    17 #ifndef EXAMPLEAPPENGINE_H
       
    18 #define EXAMPLEAPPENGINE_H
       
    19 
       
    20 #include <qobject.h>
       
    21 
       
    22 class QFile;
       
    23 class ExampleAppEnginePrivate;
       
    24 
       
    25 class ExampleAppEngine : public QObject
       
    26 {
       
    27     Q_OBJECT
       
    28 
       
    29 public:
       
    30     enum
       
    31     {
       
    32         PlaybackStateStopped,
       
    33         PlaybackStatePaused,
       
    34         PlaybackStateBuffering,
       
    35         PlaybackStatePlaying
       
    36     };
       
    37     
       
    38 public:
       
    39     ExampleAppEngine();
       
    40     ~ExampleAppEngine();
       
    41     
       
    42 public:
       
    43     void construct();
       
    44     int getIap() const;
       
    45     QString getIapName() const;
       
    46     bool isPauseSupported() const;
       
    47     bool isSeekSupported() const;
       
    48     int getPlaybackState() const;
       
    49     
       
    50 public slots:
       
    51     void searchRenderingDevices();
       
    52     void prepareRenderingDevice(const QString &uuid);
       
    53     int initFile(const QString& file);
       
    54     void play();
       
    55     void pause();
       
    56     void stop();
       
    57     void volumeUp();
       
    58     void volumeDown();
       
    59     void rew();
       
    60     void ff();
       
    61     
       
    62 signals:
       
    63     void initComplete(int);
       
    64     void stateChanged(int);
       
    65     void renderingDeviceSearchStarted();
       
    66     void renderingDeviceFound(const QString &, const QString &);
       
    67     void renderingDeviceDisappeared(const QString &, const QString &);
       
    68     void iapUpdated(const QString &);
       
    69     void iapUpdated(int);
       
    70         
       
    71 private: // data
       
    72     ExampleAppEnginePrivate* const d_ptr;
       
    73     Q_DECLARE_PRIVATE_D(d_ptr, ExampleAppEngine)
       
    74     Q_DISABLE_COPY(ExampleAppEngine)    
       
    75 };
       
    76 
       
    77 #endif // EXAMPLEAPPENGINE_H