Merge "Request for a data item value is not handle by SSO"
This commit is contained in:
commit
148b0dd3b2
1 changed files with 8 additions and 9 deletions
|
@ -97,6 +97,7 @@ void SystemStatusOsObserver::subscribe(const list<DataItemId>& l, IDataItemObser
|
||||||
list<DataItemId>& l, IDataItemObserver* client, bool requestData) :
|
list<DataItemId>& l, IDataItemObserver* client, bool requestData) :
|
||||||
mParent(parent), mClient(client),
|
mParent(parent), mClient(client),
|
||||||
mDataItemSet(containerTransfer<list<DataItemId>, unordered_set<DataItemId>>(l)),
|
mDataItemSet(containerTransfer<list<DataItemId>, unordered_set<DataItemId>>(l)),
|
||||||
|
diItemlist(l),
|
||||||
mToRequestData(requestData) {}
|
mToRequestData(requestData) {}
|
||||||
|
|
||||||
void proc() const {
|
void proc() const {
|
||||||
|
@ -107,16 +108,13 @@ void SystemStatusOsObserver::subscribe(const list<DataItemId>& l, IDataItemObser
|
||||||
mParent->sendCachedDataItems(mDataItemSet, mClient);
|
mParent->sendCachedDataItems(mDataItemSet, mClient);
|
||||||
|
|
||||||
// Send subscription set to framework
|
// Send subscription set to framework
|
||||||
if (nullptr != mParent->mContext.mSubscriptionObj && !dataItemsToSubscribe.empty()) {
|
if (nullptr != mParent->mContext.mSubscriptionObj) {
|
||||||
|
if (mToRequestData) {
|
||||||
|
LOC_LOGD("Request Data sent to framework for the following");
|
||||||
|
mParent->mContext.mSubscriptionObj->requestData(diItemlist, mParent);
|
||||||
|
} else if (!dataItemsToSubscribe.empty()) {
|
||||||
LOC_LOGD("Subscribe Request sent to framework for the following");
|
LOC_LOGD("Subscribe Request sent to framework for the following");
|
||||||
mParent->logMe(dataItemsToSubscribe);
|
mParent->logMe(dataItemsToSubscribe);
|
||||||
|
|
||||||
if (mToRequestData) {
|
|
||||||
mParent->mContext.mSubscriptionObj->requestData(
|
|
||||||
containerTransfer<unordered_set<DataItemId>, list<DataItemId>>(
|
|
||||||
std::move(dataItemsToSubscribe)),
|
|
||||||
mParent);
|
|
||||||
} else {
|
|
||||||
mParent->mContext.mSubscriptionObj->subscribe(
|
mParent->mContext.mSubscriptionObj->subscribe(
|
||||||
containerTransfer<unordered_set<DataItemId>, list<DataItemId>>(
|
containerTransfer<unordered_set<DataItemId>, list<DataItemId>>(
|
||||||
std::move(dataItemsToSubscribe)),
|
std::move(dataItemsToSubscribe)),
|
||||||
|
@ -127,6 +125,7 @@ void SystemStatusOsObserver::subscribe(const list<DataItemId>& l, IDataItemObser
|
||||||
mutable SystemStatusOsObserver* mParent;
|
mutable SystemStatusOsObserver* mParent;
|
||||||
IDataItemObserver* mClient;
|
IDataItemObserver* mClient;
|
||||||
const unordered_set<DataItemId> mDataItemSet;
|
const unordered_set<DataItemId> mDataItemSet;
|
||||||
|
const list<DataItemId> diItemlist;
|
||||||
bool mToRequestData;
|
bool mToRequestData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue