tsrc/telephonyaudioroutingstub/inc/telephonyaudiorouting.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
    54         * @since Series 60 3.1
    54         * @since Series 60 3.1
    55         */
    55         */
    56         static CTelephonyAudioRouting* NewL(
    56         static CTelephonyAudioRouting* NewL(
    57                             MTelephonyAudioRoutingObserver& aObserver );
    57                             MTelephonyAudioRoutingObserver& aObserver );
    58                             
    58                             
    59         ~CTelephonyAudioRouting();
    59         virtual ~CTelephonyAudioRouting();
    60 
    60 
    61         /**
    61         /**
    62         * Returns array of currently available outputs.
    62         * Returns array of currently available outputs.
    63         * The array contains list of following outputs depending on whether the
    63         * The array contains list of following outputs depending on whether the
    64         * output is available or not at the time of query:
    64         * output is available or not at the time of query:
    72         *
    72         *
    73         * @since Series 60 3.1
    73         * @since Series 60 3.1
    74         * @param none.
    74         * @param none.
    75         * @return TArray<TAudioOutput>& Array of available outputs.
    75         * @return TArray<TAudioOutput>& Array of available outputs.
    76         */     
    76         */     
    77         const TArray<TAudioOutput>& AvailableOutputs();
    77         virtual const TArray<TAudioOutput>& AvailableOutputs();
    78 
    78 
    79         /**
    79         /**
    80         * Returns the current output configured by the client application to play
    80         * Returns the current output configured by the client application to play
    81         * telephony audio.
    81         * telephony audio.
    82         * Possible values are:
    82         * Possible values are:
    92         *
    92         *
    93         * @since Series 60 3.1
    93         * @since Series 60 3.1
    94         * @param none.
    94         * @param none.
    95         * @return TAudioOutput Current output.
    95         * @return TAudioOutput Current output.
    96         */       
    96         */       
    97         TAudioOutput Output();
    97         virtual TAudioOutput Output();
    98 
    98 
    99         /**
    99         /**
   100         * Sends an asynchronous request to Adaptation to set the output
   100         * Sends an asynchronous request to Adaptation to set the output
   101         * where telephony audio will be routed. This request is completed only
   101         * where telephony audio will be routed. This request is completed only
   102         * when the application receives
   102         * when the application receives
   116         * @since Series 60 3.1
   116         * @since Series 60 3.1
   117         * @param aOutput : output requested by application. This can only be any
   117         * @param aOutput : output requested by application. This can only be any
   118         *           of the outputs from AvailableOutputs() list or ENotActive.
   118         *           of the outputs from AvailableOutputs() list or ENotActive.
   119         * @return none.
   119         * @return none.
   120         */
   120         */
   121         void SetOutputL( TAudioOutput aOutput = ENotActive );
   121         virtual void SetOutputL( TAudioOutput aOutput = ENotActive );
   122         
   122         
   123         /**
   123         /**
   124         * Returns the second last output that was successfully configured to
   124         * Returns the second last output that was successfully configured to
   125         * play telephony audio.
   125         * play telephony audio.
   126         * Possible values are:
   126         * Possible values are:
   135         * @param none.
   135         * @param none.
   136         * @return TAudioOutput Previous output that was configured for telephony
   136         * @return TAudioOutput Previous output that was configured for telephony
   137         *           audio. ENone will never be returned since telephony apps cannot call
   137         *           audio. ENone will never be returned since telephony apps cannot call
   138         *           SetOutputL(ENone).
   138         *           SetOutputL(ENone).
   139         */
   139         */
   140         TAudioOutput PreviousOutput();
   140         virtual TAudioOutput PreviousOutput();
   141 
   141 
   142         /*
   142         /*
   143         * Sends the Show Note mode to server along with the next SetOutputL()
   143         * Sends the Show Note mode to server along with the next SetOutputL()
   144         * request.
   144         * request.
   145         *
   145         *
   153         *
   153         *
   154         * @since Series 60 3.1
   154         * @since Series 60 3.1
   155         * @param TBool aMode Show Note mode. ETrue or EFalse.
   155         * @param TBool aMode Show Note mode. ETrue or EFalse.
   156         * @return KErrNone if succesfull, otherwise system-wide error code.
   156         * @return KErrNone if succesfull, otherwise system-wide error code.
   157         */
   157         */
   158         TInt SetShowNote( TBool aMode );
   158         virtual TInt SetShowNote( TBool aMode );
   159         
   159         
   160         /*
   160         /*
   161         * Returns the the Show Note mode for the last succesfully completed
   161         * Returns the the Show Note mode for the last succesfully completed
   162         * SetOutputL() request.
   162         * SetOutputL() request.
   163         *
   163         *
   180         * @since Series 60 3.1
   180         * @since Series 60 3.1
   181         * @param TBool aMode. On return of this function will contain
   181         * @param TBool aMode. On return of this function will contain
   182         *        Show Note mode. EFalse or ETrue.
   182         *        Show Note mode. EFalse or ETrue.
   183         * @return KErrNone if succesfull, otherwise system-wide error code.
   183         * @return KErrNone if succesfull, otherwise system-wide error code.
   184         */
   184         */
   185         TInt GetShowNote( TBool& aMode );    
   185         virtual TInt GetShowNote( TBool& aMode );    
   186     
   186     
   187     private:
   187     private:
   188     
   188     
   189         CTelephonyAudioRouting( MTelephonyAudioRoutingObserver& aObserver );
   189         CTelephonyAudioRouting( MTelephonyAudioRoutingObserver& aObserver );
   190         void ConstructL();
   190         void ConstructL();
   192     public: // stub data
   192     public: // stub data
   193     
   193     
   194         MTelephonyAudioRoutingObserver& iObserver;
   194         MTelephonyAudioRoutingObserver& iObserver;
   195     
   195     
   196         RArray<TAudioOutput> iAvailableOutputs;
   196         RArray<TAudioOutput> iAvailableOutputs;
   197         TAudioOutput iCurrentOutput;
   197         static TAudioOutput iCurrentOutput;
   198         TAudioOutput iPreviousOutput;
   198         static TAudioOutput iPreviousOutput;
   199     
   199     
   200         TBool iShowNoteMode;
   200         TBool iShowNoteMode;
   201 
   201 
   202         // If this variable is set to other value than KErrNone, next operation
   202         // If this variable is set to other value than KErrNone, next operation
   203         // with no-fail quarantee fails either by leaving or by using return 
   203         // with no-fail quarantee fails either by leaving or by using return