367 result == true |
367 result == true |
368 \endcode |
368 \endcode |
369 */ |
369 */ |
370 bool CaService::touch(const CaEntry &entry) const |
370 bool CaService::touch(const CaEntry &entry) const |
371 { |
371 { |
372 if (entry.flags() & RemovableEntryFlag && |
372 return m_d->touch(entry); |
373 (entry.flags() & UsedEntryFlag) == 0 && |
|
374 entry.role() == ItemEntryRole && |
|
375 entry.entryTypeName() != QString(Hs::packageTypeName)) { |
|
376 return m_d->touch(entry); |
|
377 } else { |
|
378 return true; |
|
379 } |
|
380 } |
373 } |
381 |
374 |
382 /*! |
375 /*! |
383 Insert entry into a given group. |
376 Insert entry into a given group. |
384 \param groupId id of a group. |
377 \param groupId id of a group. |
1130 \retval boolean with result of operation |
1123 \retval boolean with result of operation |
1131 */ |
1124 */ |
1132 bool CaServicePrivate::touch(const CaEntry &entry) |
1125 bool CaServicePrivate::touch(const CaEntry &entry) |
1133 { |
1126 { |
1134 qDebug() << "CaServicePrivate::touch" << "entryId: " << entry.id(); |
1127 qDebug() << "CaServicePrivate::touch" << "entryId: " << entry.id(); |
1135 |
1128 |
1136 mErrorCode = mProxy->touch(entry); |
1129 mErrorCode = NoErrorCode; |
1137 if (mErrorCode == ServerTerminated) { |
1130 if (entry.flags() & RemovableEntryFlag && |
1138 if (!mProxy->connect()) { |
1131 (entry.flags() & UsedEntryFlag) == 0 && |
1139 if (mNotifierProxy) { |
1132 entry.role() == ItemEntryRole && |
1140 mNotifierProxy->connectSessions(); |
1133 entry.entryTypeName() != QString(Hs::packageTypeName)) { |
|
1134 |
|
1135 mErrorCode = mProxy->touch(entry); |
|
1136 if (mErrorCode == ServerTerminated) { |
|
1137 if (!mProxy->connect()) { |
|
1138 if (mNotifierProxy) { |
|
1139 mNotifierProxy->connectSessions(); |
|
1140 } |
|
1141 mErrorCode = mProxy->touch(entry); |
1141 } |
1142 } |
1142 mErrorCode = mProxy->touch(entry); |
1143 } |
1143 } |
|
1144 } |
1144 } |
1145 |
1145 |
1146 qDebug() << "CaServicePrivate::touch mErrorCode:" << mErrorCode; |
1146 qDebug() << "CaServicePrivate::touch mErrorCode:" << mErrorCode; |
1147 |
1147 |
1148 return (mErrorCode == NoErrorCode); |
1148 return (mErrorCode == NoErrorCode); |
1366 |
1366 |
1367 if (entry.flags() & UninstallEntryFlag) { |
1367 if (entry.flags() & UninstallEntryFlag) { |
1368 return 0; |
1368 return 0; |
1369 } |
1369 } |
1370 |
1370 |
1371 if (command == caCmdOpen) { |
|
1372 touch(entry); |
|
1373 } |
|
1374 |
|
1375 int errorCode = mCommandHandler->execute(entry, |
1371 int errorCode = mCommandHandler->execute(entry, |
1376 command, receiver, member); |
1372 command, receiver, member); |
1377 mErrorCode = CaObjectAdapter::convertErrorCode(errorCode); |
1373 mErrorCode = CaObjectAdapter::convertErrorCode(errorCode); |
1378 |
1374 |
|
1375 if (command == caCmdOpen) { |
|
1376 touch(entry); |
|
1377 } |
1379 |
1378 |
1380 qDebug() << "CaServicePrivate::executeCommand mErrorCode on return:" |
1379 qDebug() << "CaServicePrivate::executeCommand mErrorCode on return:" |
1381 << mErrorCode; |
1380 << mErrorCode; |
1382 |
1381 |
1383 CACLIENTTEST_FUNC_EXIT("CaServicePrivate::executeCommand"); |
1382 CACLIENTTEST_FUNC_EXIT("CaServicePrivate::executeCommand"); |