Merge "fixed data items for service and cell info"
This commit is contained in:
commit
075e7acc0a
2 changed files with 30 additions and 10 deletions
|
@ -514,8 +514,9 @@ public:
|
|||
RilServiceInfoDataItemBase() {}
|
||||
inline SystemStatusServiceInfo(const RilServiceInfoDataItemBase& itemBase) :
|
||||
RilServiceInfoDataItemBase(itemBase) {}
|
||||
inline bool equals(const SystemStatusServiceInfo& /*peer*/) {
|
||||
return true;
|
||||
inline bool equals(const SystemStatusServiceInfo& peer) {
|
||||
return static_cast<const RilServiceInfoDataItemBase&>(peer) ==
|
||||
static_cast<const RilServiceInfoDataItemBase&>(*this);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -527,8 +528,9 @@ public:
|
|||
RilCellInfoDataItemBase() {}
|
||||
inline SystemStatusRilCellInfo(const RilCellInfoDataItemBase& itemBase) :
|
||||
RilCellInfoDataItemBase(itemBase) {}
|
||||
inline bool equals(const SystemStatusRilCellInfo& /*peer*/) {
|
||||
return true;
|
||||
inline bool equals(const SystemStatusRilCellInfo& peer) {
|
||||
return static_cast<const RilCellInfoDataItemBase&>(peer) ==
|
||||
static_cast<const RilCellInfoDataItemBase&>(*this);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -314,24 +314,42 @@ protected:
|
|||
|
||||
class RilServiceInfoDataItemBase : public IDataItemCore {
|
||||
public:
|
||||
RilServiceInfoDataItemBase() :
|
||||
mId(RILSERVICEINFO_DATA_ITEM_ID) {}
|
||||
virtual ~RilServiceInfoDataItemBase() {}
|
||||
inline RilServiceInfoDataItemBase() :
|
||||
mData(nullptr), mId(RILSERVICEINFO_DATA_ITEM_ID) {}
|
||||
inline virtual ~RilServiceInfoDataItemBase() { if (nullptr != mData) free(mData); }
|
||||
inline virtual DataItemId getId() { return mId; }
|
||||
virtual void stringify(string& /*valueStr*/) {}
|
||||
virtual int32_t copy(IDataItemCore* /*src*/, bool* /*dataItemCopied = NULL*/) {return 1;}
|
||||
inline RilServiceInfoDataItemBase(const RilServiceInfoDataItemBase& peer) :
|
||||
RilServiceInfoDataItemBase() {
|
||||
peer.setPeerData(*this);
|
||||
}
|
||||
inline virtual bool operator==(const RilServiceInfoDataItemBase& other) const {
|
||||
return other.mData == mData;
|
||||
}
|
||||
inline virtual void setPeerData(RilServiceInfoDataItemBase& /*peer*/) const {}
|
||||
void* mData;
|
||||
protected:
|
||||
DataItemId mId;
|
||||
};
|
||||
|
||||
class RilCellInfoDataItemBase : public IDataItemCore {
|
||||
public:
|
||||
RilCellInfoDataItemBase() :
|
||||
mId(RILCELLINFO_DATA_ITEM_ID) {}
|
||||
virtual ~RilCellInfoDataItemBase() {}
|
||||
inline RilCellInfoDataItemBase() :
|
||||
mData(nullptr), mId(RILCELLINFO_DATA_ITEM_ID) {}
|
||||
inline virtual ~RilCellInfoDataItemBase() { if (nullptr != mData) free(mData); }
|
||||
inline virtual DataItemId getId() { return mId; }
|
||||
virtual void stringify(string& /*valueStr*/) {}
|
||||
virtual int32_t copy(IDataItemCore* /*src*/, bool* /*dataItemCopied = NULL*/) {return 1;}
|
||||
inline RilCellInfoDataItemBase(const RilCellInfoDataItemBase& peer) :
|
||||
RilCellInfoDataItemBase() {
|
||||
peer.setPeerData(*this);
|
||||
}
|
||||
inline virtual bool operator==(const RilCellInfoDataItemBase& other) const {
|
||||
return other.mData == mData;
|
||||
}
|
||||
inline virtual void setPeerData(RilCellInfoDataItemBase& /*peer*/) const {}
|
||||
void* mData;
|
||||
protected:
|
||||
DataItemId mId;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue