tsrc/musenginestub/inc/musengsession.h
changeset 0 f0cf47e981f9
child 22 73a1feb507fb
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     1 /*
       
     2 * Copyright (c) 2005 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MUSHENGSESSION_H
       
    20 #define MUSHENGSESSION_H
       
    21 
       
    22 // USER INCLUDES
       
    23 
       
    24 //SYSTEM INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MMusEngSessionObserver;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 * Base class for Multimedia Sharing Engine sessions, inherited by
       
    35 * CMusEngMceSession.
       
    36 *
       
    37 * CMusEngSession encapsulates all common activities example using
       
    38 * resources.
       
    39 *
       
    40 * @lib musengine.lib
       
    41 * @since S60 v3.2
       
    42 */
       
    43 class CMusEngSession : public CBase
       
    44     {
       
    45 
       
    46     public:
       
    47 
       
    48         /**
       
    49         * Desctructor, finalize session
       
    50         *
       
    51         * @since S60 v3.2
       
    52         */
       
    53         ~CMusEngSession();
       
    54 
       
    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 
       
   144 
       
   145     protected:
       
   146 
       
   147         /**
       
   148         * Constructor, private cannot be instantiate
       
   149         *
       
   150         *
       
   151         * @since S60 v3.2
       
   152         * @param TRect reserved drawing area for this session
       
   153         */
       
   154         CMusEngSession( const TRect& aRect );
       
   155 
       
   156 
       
   157     protected:
       
   158 
       
   159         /**
       
   160         * second-phase constructor, called by those session specific
       
   161         * constructors
       
   162         *
       
   163         * @since S60 v3.2
       
   164         */
       
   165         void ConstructL();
       
   166 
       
   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     };
       
   198 
       
   199 #endif //MUSHENGSESSION_H