contentstorage/caclient/stub/src/caclientnotifierproxy.cpp
changeset 73 4bc7b118b3df
parent 60 f62f87b200ec
equal deleted inserted replaced
66:32469d7d46ff 73:4bc7b118b3df
    38 }
    38 }
    39 
    39 
    40 //----------------------------------------------------------------------------
    40 //----------------------------------------------------------------------------
    41 //
    41 //
    42 //----------------------------------------------------------------------------
    42 //----------------------------------------------------------------------------
    43 void CaClientNotifierProxy::entryChanged(int entryId,
       
    44         ChangeType changeType) const
       
    45 {
       
    46     qDebug() << "CaClientProxy::entryChanged entryId:"
       
    47              << entryId << "changeType:" << changeType;
       
    48     emit signalEntryChanged(entryId, changeType);
       
    49 }
       
    50 
       
    51 //----------------------------------------------------------------------------
       
    52 //
       
    53 //----------------------------------------------------------------------------
       
    54 void CaClientNotifierProxy::entryChanged(const CaEntry &entry,
       
    55         ChangeType changeType) const
       
    56 {
       
    57     qDebug() << "CaClientProxy::entryChanged changeType:" << changeType;
       
    58     CaEntry *caEntry = new CaEntry(entry);
       
    59     emit signalEntryChanged(*caEntry, changeType);
       
    60 }
       
    61 
       
    62 //----------------------------------------------------------------------------
       
    63 //
       
    64 //----------------------------------------------------------------------------
       
    65 void CaClientNotifierProxy::entryTouched(int id) const
       
    66 {
       
    67     qDebug() << "CaClientProxy::entryTouched id:" << id;
       
    68     emit signalEntryTouched(id);
       
    69 }
       
    70 
       
    71 //----------------------------------------------------------------------------
       
    72 //
       
    73 //----------------------------------------------------------------------------
       
    74 void CaClientNotifierProxy::groupContentChanged(int groupId) const
       
    75 {
       
    76     qDebug() << "CaClientProxy::groupContentChanged groupId:" << groupId;
       
    77     emit signalGroupContentChanged(groupId);
       
    78 }
       
    79 
       
    80 //----------------------------------------------------------------------------
       
    81 //
       
    82 //----------------------------------------------------------------------------
       
    83 int CaClientNotifierProxy::registerNotifier(
    43 int CaClientNotifierProxy::registerNotifier(
    84     const CaNotifierFilter *notifierFilter,
    44     const CaNotifierFilter *notifierFilter,
    85     CaNotifierPrivate::NotifierType notifierType,
    45     CaNotifierPrivate::NotifierType notifierType,
    86     const CaClientNotifierProxy *notifierProxy)
    46     const CaObserver *observer)
    87 {
    47 {
    88     qDebug() << "CaClientProxy::registerNotifier notifierType:"
    48     qDebug() << "CaClientProxy::registerNotifier notifierType:"
    89              << notifierType;
    49              << notifierType;
    90     QMutexLocker locker(&mMutex);
    50     return CaNotifiers::addNotifier(notifierFilter, notifierType, observer);
    91     return CaNotifiers::addNotifier(notifierFilter, notifierType, notifierProxy);
       
    92 }
    51 }
    93 
    52 
    94 //----------------------------------------------------------------------------
    53 //----------------------------------------------------------------------------
    95 //
    54 //
    96 //----------------------------------------------------------------------------
    55 //----------------------------------------------------------------------------
    98     const CaNotifierFilter &notifierFilter,
    57     const CaNotifierFilter &notifierFilter,
    99     CaNotifierPrivate::NotifierType notifierType)
    58     CaNotifierPrivate::NotifierType notifierType)
   100 {
    59 {
   101     qDebug() << "CaClientProxy::unregisterNotifier notifierType:"
    60     qDebug() << "CaClientProxy::unregisterNotifier notifierType:"
   102              << notifierType;
    61              << notifierType;
   103     QMutexLocker locker(&mMutex);
       
   104     CaNotifiers::removeNotifier(&notifierFilter, notifierType);
    62     CaNotifiers::removeNotifier(&notifierFilter, notifierType);
   105 }
    63 }
   106 
    64 
       
    65 
       
    66 //----------------------------------------------------------------------------
       
    67 //
       
    68 //----------------------------------------------------------------------------
       
    69 void CaClientNotifierProxy::connectSessions()
       
    70 {
       
    71     qDebug() << "Nothing to do on windows";
       
    72 }
       
    73 
       
    74