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