coreapplicationuis/advancedtspcontroller/tsrc/testtspcontroller/inc/mockremcontspobserver.h
changeset 77 b01c07dfcf84
equal deleted inserted replaced
74:1505405bc645 77:b01c07dfcf84
       
     1 /*
       
     2  * MockRemConTSPObserver.h
       
     3  *
       
     4  *  Created on: 21.7.2010
       
     5  *      Author: tongsun
       
     6  */
       
     7 
       
     8 #ifndef MOCKREMCONTSPOBSERVER_H
       
     9 #define MOCKREMCONTSPOBSERVER_H
       
    10 
       
    11 #include <e32base.h>
       
    12 #include <remcon/remcontargetselectorpluginobserver.h>
       
    13 
       
    14 
       
    15 // CLASS DEFINITION
       
    16 /**
       
    17  * Unit test mock class.
       
    18  */
       
    19 NONSHARABLE_CLASS(CMockRemConTSPObserver) 
       
    20     : public MRemConTargetSelectorPluginObserver //,public MCFListener
       
    21     {
       
    22 public:          
       
    23         // Constructors and destructor
       
    24         static CMockRemConTSPObserver* NewL();
       
    25         static CMockRemConTSPObserver* NewLC();
       
    26         ~CMockRemConTSPObserver();
       
    27 
       
    28         // from MRemConTargetSelectorPluginObserver
       
    29         void OutgoingCommandAddressed(TInt aError) ;
       
    30         void OutgoingCommandPermitted(TBool aIsPermitted);
       
    31         void IncomingCommandAddressed(TInt aError);
       
    32         void OutgoingResponsePermitted(TBool aIsPermitted) ;
       
    33         void IncomingNotifyAddressed(TClientInfo* aClientInfo, TInt aError); 
       
    34         void ReAddressNotifies() ;
       
    35         TInt GetConnections(TSglQue<TRemConAddress>& aConnections) ;
       
    36 public:
       
    37         TInt Response();
       
    38         void SetResponse(TInt aValue) ;
       
    39         TUid BearerUid() {return iBearerUid;}
       
    40         TClientInfo ClientInfo() {return iClientInfo; }
       
    41 private:
       
    42         virtual void MrctspoDoOutgoingCommandAddressed(TInt aError);
       
    43         virtual void MrctspoDoOutgoingCommandPermitted(TBool /*aIsPermitted*/) ;
       
    44         virtual void MrctspoDoIncomingCommandAddressed(TInt aError );
       
    45         virtual TInt MrctspoDoGetConnections(TSglQue<TRemConAddress>& /*aConnections*/) ;
       
    46         virtual void MrctspoDoOutgoingResponsePermitted(TBool /*aIsPermitted*/);
       
    47         virtual void MrctspoDoIncomingNotifyAddressed(TClientInfo* /*aClientInfo*/, TInt aError );
       
    48         virtual void MrctspoDoReAddressNotifies() ;
       
    49 
       
    50         virtual void MrctspoDoOutgoingNotifyCommandAddressed(TRemConAddress* aConnection, TInt aError);        
       
    51         virtual void MrctspoDoOutgoingNotifyCommandPermitted(TBool aIsPermitted) ;
       
    52         virtual void MrctspoDoIncomingCommandPermitted(TBool aIsPermitted) ;
       
    53         virtual void MrctspoDoIncomingNotifyPermitted(TBool aIsPermitted) ;
       
    54         virtual TInt MrctspoSetLocalAddressedClient(const TUid& aBearerUid, const TClientInfo& aClientInfo) ;
       
    55 
       
    56     private: // Constructors
       
    57         CMockRemConTSPObserver();
       
    58         void ConstructL();
       
    59     private:
       
    60         TInt iObserverResponse;
       
    61         TUid iBearerUid;
       
    62         TClientInfo iClientInfo;
       
    63     };
       
    64 #endif  //MOCKREMCONTSPOBSERVER_H