usbmgmt/usbmgr/usbman/server/INC/cusbhost.h
changeset 49 93c0009bd947
parent 0 c9bc50fca66e
equal deleted inserted replaced
48:21625e5de155 49:93c0009bd947
    27 #include "usbhoststack.h"
    27 #include "usbhoststack.h"
    28 #include "musbotghostnotifyobserver.h"
    28 #include "musbotghostnotifyobserver.h"
    29 #include "musbinternalobservers.h"
    29 #include "musbinternalobservers.h"
    30 #include "cusbhostwatcher.h"
    30 #include "cusbhostwatcher.h"
    31 
    31 
       
    32 class CUsbServer;
       
    33 
    32 NONSHARABLE_CLASS(CUsbHost) : public CBase, public MUsbHostObserver
    34 NONSHARABLE_CLASS(CUsbHost) : public CBase, public MUsbHostObserver
    33 	{
    35 	{
    34 public:
    36 public:
    35 	static CUsbHost* NewL();
    37 	static CUsbHost* NewL(CUsbServer& aServer);
    36 	virtual ~CUsbHost();
    38 	virtual ~CUsbHost();
    37 
    39 
    38 private:
    40 private:
    39 	CUsbHost();
    41 	CUsbHost(CUsbServer& aServer);
    40 	void ConstructL();
    42 	void ConstructL();
    41 
    43 
    42 private:
    44 private:
    43 	static CUsbHost* iInstance;
    45 	static CUsbHost* iInstance;
    44 	
    46 	
    59 	virtual void NotifyHostEvent(TUint aWatcherId);
    61 	virtual void NotifyHostEvent(TUint aWatcherId);
    60 
    62 
    61 private:
    63 private:
    62 
    64 
    63 	void UpdateNumOfObservers();
    65 	void UpdateNumOfObservers();
       
    66 	void ProcessHostEvent(TUint aWatcherId);
    64 
    67 
    65 private:
    68 private:
    66 	TBool iHasBeenStarted;
    69 	TBool iHasBeenStarted;
    67 
    70 
    68 	CActiveUsbHostWatcher* iUsbHostWatcher[2];
    71 	CActiveUsbHostWatcher* iUsbHostWatcher[2];
    69 	TDeviceEventInformation iHostEventInfo;
    72 	TDeviceEventInformation iHostEventInfo;
    70 	TInt iHostMessage;
    73 	TInt iHostMessage;
    71 	RUsbHostStack iUsbHostStack;
    74 	RUsbHostStack iUsbHostStack;
    72 	RPointerArray<MUsbOtgHostNotifyObserver> iObservers;
    75 	RPointerArray<MUsbOtgHostNotifyObserver> iObservers;
    73 	TUint iNumOfObservers;
    76 	TUint iNumOfObservers;
       
    77 	CUsbServer& iUsbServer;
    74 	};
    78 	};
    75 
    79 
    76 #endif //CUSBHOST_H
    80 #endif //CUSBHOST_H