messagingapp/msgui/msguiutils/inc/msgservicelaunchutil.h
changeset 73 ecf6a73a9186
equal deleted inserted replaced
68:e8a69c93c830 73:ecf6a73a9186
       
     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:This class provides duration of media file by parsing it
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef MSGSERVICELAUNCHUTIL_H_
       
    19 #define MSGSERVICELAUNCHUTIL_H_
       
    20 
       
    21 #ifdef BUILD_MSGUI_UTILS_DLL
       
    22 #define MSGUI_UTILS_DLL_EXPORT Q_DECL_EXPORT
       
    23 #else
       
    24 #define MSGUI_UTILS_DLL_EXPORT Q_DECL_IMPORT
       
    25 #endif
       
    26 
       
    27 #include <QObject>
       
    28 
       
    29 /**
       
    30  * This class provides duration of media file by parsing it
       
    31  * 
       
    32  */
       
    33 class MSGUI_UTILS_DLL_EXPORT MsgServiceLaunchUtil : public QObject
       
    34 {
       
    35     Q_OBJECT
       
    36     
       
    37 public:   
       
    38     /**
       
    39      * Constructor
       
    40      */
       
    41     MsgServiceLaunchUtil(QObject* parent=0);
       
    42     
       
    43     /**
       
    44      * Destructor
       
    45      */
       
    46     ~MsgServiceLaunchUtil();
       
    47     
       
    48     /**
       
    49      * Utility function to launch different content viewers.
       
    50      * @param mimeType Mime type of the content.
       
    51      * @param filePath Absolute file path of content.
       
    52      */
       
    53     void launchContentViewer(
       
    54             const QString &mimeType, 
       
    55             const QString &filePath);    
       
    56     
       
    57     /**
       
    58      * Utility function to launch different content viewers.
       
    59      * @param mimeType Mime type of the content.
       
    60      * @param filePath Absolute file path of content.
       
    61      */
       
    62     void launchContentViewer(int messageId); 
       
    63 
       
    64 private slots:
       
    65 
       
    66     /**
       
    67      * Service launch complete.
       
    68      */
       
    69     void handleOk(const QVariant& result);
       
    70 
       
    71     /**
       
    72      * Service launch errors.
       
    73      */
       
    74     void handleError(int errorCode, const QString& errorMessage);
       
    75     
       
    76 private:
       
    77     
       
    78     /**
       
    79      * This launches any sharable content using XQSharable
       
    80      * @param filePath reference to sharable file path
       
    81     */
       
    82     void launchViaSharableFile(const QString &filePath);   
       
    83     
       
    84 };    
       
    85 
       
    86 #endif /* MSGSERVICELAUNCHUTIL_H_ */
       
    87 
       
    88 //eof
       
    89