mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsringtone.h
branchRCL_3
changeset 56 63223d4fd956
parent 55 6c1dfe4da5dd
child 59 666f9a5a90a9
equal deleted inserted replaced
55:6c1dfe4da5dd 56:63223d4fd956
     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: QT Bindings for TMS
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef QTMS_RINGTONE_H
       
    19 #define QTMS_RINGTONE_H
       
    20 
       
    21 #include <qtms.h>
       
    22 #include <QObject>
       
    23 #include "qtmswrapperexport.h"
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 namespace TMS
       
    27 {
       
    28 class TMSRingTone;
       
    29 }
       
    30 
       
    31 namespace QTMS
       
    32 {
       
    33 
       
    34 /**
       
    35  * QTMSRingTone class
       
    36  *
       
    37  * This class provides ring tone playback capability to the QTMS clients.
       
    38  *
       
    39  * @lib QTMSapi.lib
       
    40  *
       
    41  */
       
    42 class QTMS_WRAPPER_DLL_EXPORT QTMSRingTone : public QObject
       
    43 {
       
    44     Q_OBJECT
       
    45 public:
       
    46     /**
       
    47      * Destructor
       
    48      */
       
    49     virtual ~QTMSRingTone();
       
    50 
       
    51     /**
       
    52      * Init ring tone player to play supplied content based on its type.
       
    53      *
       
    54      * @param  type
       
    55      *      Type of the content descriptor. Allowed types:
       
    56      *          - QTMS_RINGTONE_DEFAULT - use RT from current Profile
       
    57      *          - QTMS_RINGTONE_FILE  - A/V File
       
    58      *          - QTMS_RINGTONE_SEQUENCE - RNG sequence in the descriptor format
       
    59      *          - QTMS_RINGTONE_BEEP_ONCE - play a beep
       
    60      *          - QTMS_RINGTONE_SILENT - play silent tone
       
    61      *          - QTMS_RINGTONE_UNSECURE_VOIP - play tone for uncecure VoIP call
       
    62      *
       
    63      * @param  str
       
    64      *      Content descriptor to play. String containing one of the following:
       
    65      *          - File with folder name
       
    66      *          - Nokia ring tone sequence in a descriptor format
       
    67      *          - NULL - Will use current Profile.
       
    68      *
       
    69      * @param  tts
       
    70      *      Text to be played. When added it will be played along with the
       
    71      *      tone. TTS can only be played with QTMS_RINGTONE_DEFAULT and
       
    72      *      TMS_RINGTONE_FILE. Parameter will be ignored for all other types.
       
    73      *          - NULL - Will use current Profile TTS setting - caller's name
       
    74      *            will be played from the phone book (if available).
       
    75      *
       
    76      * @return
       
    77      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    78      *
       
    79      */
       
    80     gint Init(const QTMSRingToneType type = QTMS_RINGTONE_DEFAULT,
       
    81         GString* str = NULL, GString* tts = NULL);
       
    82 
       
    83     /**
       
    84      * Deinit ring tone player.
       
    85      *
       
    86      * @return
       
    87      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    88      *
       
    89      */
       
    90     gint Deinit();
       
    91 
       
    92     /**
       
    93      * Start ring tone playback.
       
    94      *
       
    95      * @return
       
    96      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    97      *
       
    98      */
       
    99     gint Play();
       
   100 
       
   101     /**
       
   102      * Stop ring tone playback.
       
   103      *
       
   104      * @return
       
   105      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   106      *
       
   107      */
       
   108     gint Stop();
       
   109 
       
   110     /**
       
   111      * Pause video ring tone playback.
       
   112      *
       
   113      * @return
       
   114      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   115      *
       
   116      */
       
   117     gint Pause();
       
   118 
       
   119     /**
       
   120      * Mute ring tone playback.
       
   121      *
       
   122      * @return
       
   123      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   124      *
       
   125      */
       
   126     gint Mute();
       
   127 
       
   128     Q_SIGNALS:
       
   129     void RingtoneEvent(const QTMSRingTone& rt, QTMSSignalEvent event);
       
   130 
       
   131 protected:
       
   132     /**
       
   133      * Constructor
       
   134      */
       
   135     QTMSRingTone();
       
   136 
       
   137 protected:
       
   138     TMS::TMSRingTone *iRingTone;
       
   139 };
       
   140 
       
   141 } //namespace QTMS
       
   142 
       
   143 #endif //QTMS_RINGTONE_H
       
   144 // End of file
       
   145