tsrc/musenginestub/inc/musengsession.h
branchRCL_3
changeset 22 73a1feb507fb
parent 0 f0cf47e981f9
child 23 bc78a40cd63c
equal deleted inserted replaced
21:33a5d2bbf6fc 22:73a1feb507fb
    14 * Description: 
    14 * Description: 
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #ifndef MUSHENGSESSION_H
    19 #ifndef MUSENGSESSION_H
    20 #define MUSHENGSESSION_H
    20 #define MUSENGSESSION_H
    21 
    21 
    22 // USER INCLUDES
       
    23 
    22 
    24 //SYSTEM INCLUDES
    23 //SYSTEM INCLUDES
    25 #include <e32base.h>
    24 #include <e32base.h>
    26 
    25 
    27 
    26 
    28 // FORWARD DECLARATIONS
       
    29 class MMusEngSessionObserver;
       
    30 
    27 
    31 // CLASS DECLARATION
    28 // CLASS DECLARATION
    32 
    29 
    33 /**
    30 /**
    34 * Base class for Multimedia Sharing Engine sessions, inherited by
    31 * Base class for Multimedia Sharing Engine sessions, inherited by
    36 *
    33 *
    37 * CMusEngSession encapsulates all common activities example using
    34 * CMusEngSession encapsulates all common activities example using
    38 * resources.
    35 * resources.
    39 *
    36 *
    40 * @lib musengine.lib
    37 * @lib musengine.lib
    41 * @since S60 v3.2
       
    42 */
    38 */
    43 class CMusEngSession : public CBase
    39 class CMusEngSession : public CBase
    44     {
    40     {
    45 
    41    
    46     public:
    42     public:
    47 
    43 
    48         /**
    44         /**
    49         * Desctructor, finalize session
    45         * Desctructor, finalize session
    50         *
    46         *
    51         * @since S60 v3.2
       
    52         */
    47         */
    53         ~CMusEngSession();
    48         ~CMusEngSession();
    54 
    49 
    55 
       
    56     public:  // API FUNCTIONS
       
    57 
       
    58         /**
       
    59         * Returns currently assigned drawing area
       
    60         *
       
    61         * @since S60 v3.2
       
    62         * @return TRect This session drawing area recttangle
       
    63         */
       
    64         IMPORT_C TRect Rect() const;
       
    65 
       
    66         /**
       
    67         * Sets new drawing area
       
    68         *
       
    69         * @since S60 v3.2
       
    70         * @param TRect This session new drawing area rectangle
       
    71         */
       
    72         IMPORT_C void SetRectL( const TRect& aRect );
       
    73 
       
    74         /**
       
    75         * Activates/deactivates loadspeaker
       
    76         *
       
    77         * @since S60 v3.2
       
    78         * @param TBool Enable or disable loudspeaker
       
    79         * @param TBool Show activation dialog
       
    80         */
       
    81         IMPORT_C void EnableLoudspeakerL( TBool aEnable, TBool aShowDialog );
       
    82 
       
    83         /**
       
    84         * Checks is loudspeaker enabled or disabled.
       
    85         *
       
    86         * @since S60 v3.2
       
    87         * @return TBool true if enabled
       
    88         */
       
    89         IMPORT_C TBool IsLoudSpeakerEnabled() const;
       
    90 
       
    91         /**
       
    92         * Returns current volume level
       
    93         *
       
    94         * @since S60 v3.2
       
    95         */
       
    96         IMPORT_C TInt VolumeL() const;
       
    97 
       
    98 
       
    99     public:  // VIRTUAL API FUNCTIONS
       
   100 
       
   101         /**
       
   102         * Increases volume level by one.
       
   103         *
       
   104         * @since S60 v3.2
       
   105         */
       
   106         IMPORT_C virtual void VolumeUpL();
       
   107 
       
   108         /**
       
   109         * Decreases volume level by one
       
   110         *
       
   111         * @since S60 v3.2
       
   112         */
       
   113         IMPORT_C virtual void VolumeDownL();
       
   114 
       
   115         /**
       
   116         * Enables or disables display. Call to this function is considered
       
   117         * as a permission or denial to draw to the display.
       
   118         *
       
   119         * @since S60 v3.2
       
   120         */
       
   121         IMPORT_C virtual void EnableDisplayL( TBool aEnable ) = 0;
       
   122 
       
   123         /**
       
   124         * Mutes current audio stream meaning that any audio is not played or
       
   125         * sent to network.
       
   126         *
       
   127         * @since S60 v3.2
       
   128         */
       
   129         IMPORT_C virtual void MuteL() = 0;
       
   130 
       
   131         /**
       
   132         * Unmute current audio stream meaning that all the audio is played
       
   133         * and if needed also sent to network.
       
   134         *
       
   135         * @since S60 v3.2
       
   136         */
       
   137         IMPORT_C virtual void UnmuteL() = 0;
       
   138 
       
   139 
       
   140     protected: // INTERNAL
       
   141 
       
   142         virtual void RectChangedL() = 0;
       
   143 
    50 
   144 
    51 
   145     protected:
    52     protected:
   146 
    53 
   147         /**
    54         /**
   148         * Constructor, private cannot be instantiate
    55         * Constructor, private cannot be instantiate
   149         *
    56         *
   150         *
    57         * @param aRect reserved drawing area for this session
   151         * @since S60 v3.2
       
   152         * @param TRect reserved drawing area for this session
       
   153         */
    58         */
   154         CMusEngSession( const TRect& aRect );
    59         CMusEngSession();
   155 
    60 
   156 
    61 
   157     protected:
    62     protected:
   158 
    63 
   159         /**
    64         /**
   160         * second-phase constructor, called by those session specific
    65         * second-phase constructor, called by those session specific 
   161         * constructors
    66         * constructors
   162         *
       
   163         * @since S60 v3.2
       
   164         */
    67         */
   165         void ConstructL();
    68         void ConstructL();
   166 
    69 
   167 
       
   168     protected: // MEMBERS
       
   169 
       
   170         /**
       
   171         * Callback pointer to interface, not own
       
   172         *
       
   173         * @since S60 v3.2
       
   174         */
       
   175         MMusEngSessionObserver* iSessionObserver;
       
   176 
       
   177 
       
   178     public: // MEMBERS
       
   179 
       
   180         /**
       
   181         * Drawing area rect
       
   182         *
       
   183         * @since S60 v3.2
       
   184         */
       
   185         TRect iRect;
       
   186 
       
   187         /**
       
   188         * Telephone utilities
       
   189         *
       
   190         * @since S60 v3.2
       
   191         */
       
   192         //CMusEngTelephoneUtils* iTelephoneUtils;
       
   193 
       
   194         TInt iErrorCode;
       
   195 
       
   196 
       
   197     };
    70     };
   198 
    71 
   199 #endif //MUSHENGSESSION_H
    72 #endif //MUSENGSESSION_H