videocollection/videocollectionview/inc/videooperatorservice.h
changeset 44 518105d52e45
child 55 4bfa887905cf
equal deleted inserted replaced
42:17f382c040b1 44:518105d52e45
       
     1 /*
       
     2 * Copyright (c) 2008 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:   VideoOperatorService class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VIDEOOPERATORSERVICE_H
       
    20 #define VIDEOOPERATORSERVICE_H
       
    21 
       
    22 #include <qobject.h>
       
    23 
       
    24 class HbPushButton;
       
    25 
       
    26 /**
       
    27  * Loading and launching functionality for operator customisable services.  
       
    28  */
       
    29 class VideoOperatorService : public QObject
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public:
       
    34 
       
    35     /**
       
    36      * Contructor.
       
    37      *
       
    38      * @param parent parent of this widget
       
    39      */
       
    40     VideoOperatorService(QObject *parent = 0);
       
    41 
       
    42     /**
       
    43      * Loads the service.
       
    44      * 
       
    45      * @titleKey Central Repository key id for the service's title.
       
    46      * @iconKey Central Repository key id for the service's icon resource.
       
    47      * @uriKey Central Repository key id for the service's URI.
       
    48      * @uidKey Central Repository key id for the service's UID.
       
    49      * 
       
    50      * @return True if service was loaded succesfully.
       
    51      */
       
    52     bool load(int titleKey, int iconKey, int uriKey, int uidKey);
       
    53 
       
    54     /**
       
    55      * Returns name for the service.
       
    56      * 
       
    57      * @return name of the service.
       
    58      */
       
    59     const QString title() const;
       
    60     
       
    61     /**
       
    62      * Returns the icon resource for the service.
       
    63      * 
       
    64      * @return path or resource id to the icon.
       
    65      */
       
    66     const QString iconResource() const;
       
    67     
       
    68 private:
       
    69     
       
    70     void launchApplicationL(const TUid uid, TInt viewId);
       
    71     
       
    72 public slots:
       
    73     
       
    74     /**
       
    75      * Launches the service.
       
    76      */
       
    77     void launchService();
       
    78     
       
    79 private:
       
    80     
       
    81     Q_DISABLE_COPY(VideoOperatorService)
       
    82     
       
    83     /**
       
    84      * Title for the service.
       
    85      */
       
    86     QString mTitle;
       
    87     
       
    88     /**
       
    89      * Icon for the service.
       
    90      */
       
    91     QString mIconResource;
       
    92     
       
    93     /**
       
    94      * Service URL if service should launch an URL.
       
    95      */
       
    96     QString mServiceUri;
       
    97     
       
    98     /**
       
    99      * Application UID if service should launch an external application.  
       
   100      */
       
   101     int mApplicationUid;
       
   102 };
       
   103 
       
   104 #endif // VIDEOOPERATORSERVICE_H
       
   105 
       
   106 // End of file.