multimediacommscontroller/mmccdtmfpayloadformat/inc/dtmftonepayloadinfo.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006 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:    Encapsulates Tone Payload field values.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef TDTMFTONEPAYLOADINFO_H
       
    22 #define TDTMFTONEPAYLOADINFO_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <e32std.h>
       
    27 
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32  *  Class to encapsulate tone payload related information.
       
    33  *
       
    34  *  @lib mmccdtmfplformat.dll
       
    35  *  @since Series 60 3.2
       
    36  */
       
    37 class TDTMFTonePayloadInfo
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40         
       
    41         /**
       
    42          * C++ default constructor.
       
    43          */
       
    44         TDTMFTonePayloadInfo();
       
    45 
       
    46     public: // New functions
       
    47         
       
    48         /**
       
    49          * Return character presentation of a tone.
       
    50          *
       
    51          * @since    Series 60 3.2
       
    52          * @return   Tone as a character
       
    53          */
       
    54         inline TChar Tone() const;
       
    55 
       
    56         /**
       
    57          * Set tone value.
       
    58          *
       
    59          * @since    Series 60 3.2
       
    60          * @param    aTone   Tone presented as a TChar
       
    61          */
       
    62         inline void SetTone( const TChar& aTone );
       
    63                 
       
    64         /**
       
    65          * Return modulation field value of the payload.
       
    66          *
       
    67          * @since    Series 60 3.2
       
    68          * @return   Modulation value
       
    69          */
       
    70         inline TUint Modulation() const;
       
    71         
       
    72         /**
       
    73          * Set modulation field value to the payload.
       
    74          *
       
    75          * @since    Series 60 3.2
       
    76          * @param    aModulation  Modulation value to set
       
    77          */
       
    78         inline void SetModulation( TUint aModulation );
       
    79         
       
    80         /**
       
    81          * Return T-bit of the payload.
       
    82          *
       
    83          * @since    Series 60 3.2
       
    84          * @return   Boolean indicating whether T-bit is set
       
    85          */
       
    86         inline TBool TBit() const;
       
    87         
       
    88         /**
       
    89          * Set T-bit value to the payload.
       
    90          *
       
    91          * @since    Series 60 3.2
       
    92          * @param    aTBit   Value to set
       
    93          */
       
    94         inline void SetTBit( TBool aTBit );
       
    95         
       
    96         /**
       
    97          * Get Volume field of the payload.
       
    98          *
       
    99          * @since    Series 60 3.2
       
   100          * @return   Volume Field value
       
   101          */
       
   102         inline TUint Volume() const;
       
   103         
       
   104         /**
       
   105          * Set Volume Field to the payload.
       
   106          *
       
   107          * @since    Series 60 3.2
       
   108          * @param    aVolume Volume Field value to set
       
   109          */
       
   110         inline void SetVolume( TUint aVolume );
       
   111         
       
   112         /**
       
   113          * Get Duration Field of the payload.
       
   114          *
       
   115          * @since    Series 60 3.2
       
   116          * @return   Duration Field value
       
   117          */
       
   118         inline TUint Duration() const;
       
   119         
       
   120         /**
       
   121          * Set Duration Field to the payload.
       
   122          *
       
   123          * @since    Series 60 3.2
       
   124          * @param    aDuration   Duration Field value to set
       
   125          */
       
   126         inline void SetDuration( TUint aDuration );
       
   127         
       
   128         /**
       
   129          * Get first frequency of the tone in payload.
       
   130          *
       
   131          * @since    Series 60 3.2
       
   132          * @return   First frequency value
       
   133          */
       
   134         inline TUint LowFrequency() const;
       
   135         
       
   136         /**
       
   137          * Set first frequency of the tone to the tone payload.
       
   138          *
       
   139          * @since    Series 60 3.2
       
   140          * @param    aLowFrequency   Frequency value to set
       
   141          */
       
   142         inline void SetLowFrequency( TUint aLowFrequency );
       
   143         
       
   144         /**
       
   145          * Get second frequency of the tone in payload.
       
   146          *
       
   147          * @since    Series 60 3.2
       
   148          * @return   Second frequency value
       
   149          */
       
   150         inline TUint HighFrequency() const;
       
   151         
       
   152         /**
       
   153          * Set second frequency of the tone to the tone payload.
       
   154          *
       
   155          * @since    Series 60 3.2
       
   156          * @param    aHighFrequency  Frequency value to set
       
   157          */
       
   158         inline void SetHighFrequency( TUint aHighFrequency );
       
   159         
       
   160         /**
       
   161          * Get tone on period used in tone playback.
       
   162          *
       
   163          * @since    Series 60 3.2
       
   164          * @return   The period over which the tone will be played
       
   165          */
       
   166         inline TTimeIntervalMicroSeconds& ToneOnPeriod();
       
   167         
       
   168         /**
       
   169          * Set tone on period used in tone playback.
       
   170          *
       
   171          * @since    Series 60 3.2
       
   172          * @param    aToneOnPeriod   Tone on period
       
   173          */
       
   174         inline void SetToneOnPeriod( 
       
   175             const TTimeIntervalMicroSeconds& aToneOnPeriod );
       
   176         
       
   177         /**
       
   178          * Set tone off period used in tone playback.
       
   179          *
       
   180          * @since    Series 60 3.2
       
   181          * @return   The period over which no tone will be played
       
   182          */
       
   183         inline TTimeIntervalMicroSeconds& ToneOffPeriod();
       
   184         
       
   185         /**
       
   186          * Set tone off period used in tone playback.
       
   187          *
       
   188          * @since    Series 60 3.2
       
   189          * @param    aToneOffPeriod  Tone off period
       
   190          */
       
   191         inline void SetToneOffPeriod( 
       
   192             const TTimeIntervalMicroSeconds& aToneOffPeriod );
       
   193         
       
   194         /**
       
   195          * Get pause length used with tone playback operation.
       
   196          *
       
   197          * @since    Series 60 3.2
       
   198          * @return   The period over which the tone playing will be paused
       
   199          */
       
   200         inline TTimeIntervalMicroSeconds& PauseLength( );
       
   201 
       
   202         /**
       
   203          * Set pause length used with tone playback operation.
       
   204          *
       
   205          * @since    Series 60 3.2
       
   206          * @param    aPauseLength    Pause length
       
   207          */
       
   208         inline void SetPauseLength( 
       
   209             const TTimeIntervalMicroSeconds& aPauseLength );
       
   210 
       
   211     private: // Data
       
   212         
       
   213         /**
       
   214          * Tone as a character
       
   215          */        
       
   216         TChar iTone;
       
   217 
       
   218         /**
       
   219          * Modulation Field of Payload
       
   220          */        
       
   221         TChar iModulation;
       
   222 
       
   223         /**
       
   224          * T bit of Payload
       
   225          */        
       
   226         TBool iTBit;
       
   227 
       
   228         /**
       
   229          * Volume Field of Payload
       
   230          */        
       
   231         TUint iVolume;
       
   232         
       
   233         /**
       
   234          * Duration Field of Payload
       
   235          */        
       
   236         TUint iDuration;
       
   237         
       
   238         /**
       
   239          * Low Frequency Field of Payload
       
   240          */        
       
   241         TUint iLowFrequency;
       
   242         
       
   243         /**
       
   244          * High Frequecny Field of Payload
       
   245          */        
       
   246         TUint iHighFrequency;
       
   247         
       
   248         /**
       
   249          * Needed for tone playback operation
       
   250          */        
       
   251         TTimeIntervalMicroSeconds iToneOnPeriod;
       
   252         
       
   253         /**
       
   254          * Needed for tone playback operation
       
   255          */        
       
   256         TTimeIntervalMicroSeconds iToneOffPeriod;
       
   257         
       
   258         /**
       
   259          * Needed for tone playback operation
       
   260          */        
       
   261         TTimeIntervalMicroSeconds iPauseLength;
       
   262     };
       
   263 
       
   264 #include    "dtmftonepayloadinfo.inl"
       
   265 
       
   266 #endif      // TDTMFTONEPAYLOADINFO_H
       
   267 
       
   268 // End of File