connectivitylayer/isce/isicommunicationmanager_dll/inc/isiindicationhandler.h
changeset 7 fa67e03b87df
parent 5 8ccc39f9d787
child 9 8486d82aef45
equal deleted inserted replaced
6:942573423a60 7:fa67e03b87df
    26 class MISIObjectRouterIf;
    26 class MISIObjectRouterIf;
    27 
    27 
    28 NONSHARABLE_CLASS( DISIIndicationHandler ) : public DBase
    28 NONSHARABLE_CLASS( DISIIndicationHandler ) : public DBase
    29     {
    29     {
    30 
    30 
    31     public:
    31     private:
    32 
    32 
    33         class TDeviceIdLink
    33         class TDeviceIdLink
    34             {
    34             {
    35             public:
    35             public:
    36                 TUint8      iDeviceId;
    36                 TUint8      iDeviceId;
    58             {
    58             {
    59             public:
    59             public:
    60                 TUint8      iObjId;
    60                 TUint8      iObjId;
    61                 SDblQueLink iSubscriberLink;
    61                 SDblQueLink iSubscriberLink;
    62             };
    62             };
    63 
    63     
       
    64     public:
       
    65     
    64         /*
    66         /*
    65         * Constructor
    67         * Constructor
    66         */
    68         */
    67         DISIIndicationHandler( MISIObjectRouterIf* aRouter );
    69         DISIIndicationHandler( MISIObjectRouterIf* aRouter );
    68 
    70 
    73 
    75 
    74         /*
    76         /*
    75         * Multicast and Subscribe must be called in same DFC thread.
    77         * Multicast and Subscribe must be called in same DFC thread.
    76         * If not then take a deep look at synchronization.
    78         * If not then take a deep look at synchronization.
    77         */
    79         */
    78         //void Multicast( TDes8& aIndication );
    80         void Multicast( TDes8& aIndication );
    79 
    81 
    80         /*
    82         /*
    81         * Multicast and Subscribe must be called in same DFC thread.
    83         * Multicast and Subscribe must be called in same DFC thread.
    82         * If not then take a deep look at synchronization.
    84         * If not then take a deep look at synchronization.
    83         */
    85         */
    84         TInt Subscribe( TDes8& aSubscriptionReq );
    86         void Subscribe( TDes8& aSubscriptionReq );
       
    87 
       
    88 
    85 
    89 
    86     private:
    90     private:
    87 
    91 
    88         void AddIndication( TServerIdLink& aServerLink, const TUint8 aIndication, const TUint16 aObjId );
    92         void AddIndication( TServerIdLink& aServerLink, const TUint8 aIndication, const TUint16 aObjId );
    89 
    93 
    90         void AddSubscriber( TIndicationLink& aIndicationLink, const TUint16 aObjId );
    94         void AddSubscriber( TIndicationLink& aIndicationLink, const TUint16 aObjId );
    91 
    95 
    92         void AddServer( TDeviceIdLink& aDeviceLink, const TUint32 aResourceId, const TUint8 aIndication, const TUint16 aObjId );
    96         void AddServer( TDeviceIdLink& aDeviceLink, const TUint32 aResourceId, const TUint8 aIndication, const TUint16 aObjId );
    93 
    97 
       
    98         void AddServer( TDeviceIdLink& aDeviceLink, const TUint32 aResourceId );
       
    99 
    94         TDeviceIdLink* GetDeviceLink( const TUint8 aDeviceId );
   100         TDeviceIdLink* GetDeviceLink( const TUint8 aDeviceId );
       
   101 
       
   102         TDeviceIdLink* GetExternalDeviceLink( const TUint8 aDeviceId );
    95 
   103 
    96         TServerIdLink* GetServerLink( TDeviceIdLink& aDeviceLink, const TUint32 aResourceId );
   104         TServerIdLink* GetServerLink( TDeviceIdLink& aDeviceLink, const TUint32 aResourceId );
    97 
   105 
    98         TIndicationLink* GetIndicationLink( TServerIdLink& aServerLink, const TUint8 aIndication );
   106         TIndicationLink* GetIndicationLink( TServerIdLink& aServerLink, const TUint8 aIndication );
    99 
   107 
   101 
   109 
   102         void PrintSubscriptions();
   110         void PrintSubscriptions();
   103 
   111 
   104         void RemoveSubscription( const TUint16 aObjId );
   112         void RemoveSubscription( const TUint16 aObjId );
   105 
   113 
   106         TInt SendSubscription( TDeviceIdLink& aDevice );
   114         void SendSubscription( TDeviceIdLink& aDevice );
   107 
   115 
   108     private:
   116     private:
   109 
   117 
   110         // Owned
   118         // Owned
   111         SDblQue         iDeviceQ;
   119         SDblQue         iDeviceQ;
       
   120         SDblQue         iExternalDeviceQ;
   112         // Not owned
   121         // Not owned
   113         MISIObjectRouterIf* iRouter;
   122         MISIObjectRouterIf* iRouter;
   114 
   123 
   115     };
   124     };
   116 
   125