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() {}
|
RilServiceInfoDataItemBase() {}
|
||||||
inline SystemStatusServiceInfo(const RilServiceInfoDataItemBase& itemBase) :
|
inline SystemStatusServiceInfo(const RilServiceInfoDataItemBase& itemBase) :
|
||||||
RilServiceInfoDataItemBase(itemBase) {}
|
RilServiceInfoDataItemBase(itemBase) {}
|
||||||
inline bool equals(const SystemStatusServiceInfo& /*peer*/) {
|
inline bool equals(const SystemStatusServiceInfo& peer) {
|
||||||
return true;
|
return static_cast<const RilServiceInfoDataItemBase&>(peer) ==
|
||||||
|
static_cast<const RilServiceInfoDataItemBase&>(*this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -527,8 +528,9 @@ public:
|
||||||
RilCellInfoDataItemBase() {}
|
RilCellInfoDataItemBase() {}
|
||||||
inline SystemStatusRilCellInfo(const RilCellInfoDataItemBase& itemBase) :
|
inline SystemStatusRilCellInfo(const RilCellInfoDataItemBase& itemBase) :
|
||||||
RilCellInfoDataItemBase(itemBase) {}
|
RilCellInfoDataItemBase(itemBase) {}
|
||||||
inline bool equals(const SystemStatusRilCellInfo& /*peer*/) {
|
inline bool equals(const SystemStatusRilCellInfo& peer) {
|
||||||
return true;
|
return static_cast<const RilCellInfoDataItemBase&>(peer) ==
|
||||||
|
static_cast<const RilCellInfoDataItemBase&>(*this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -314,24 +314,42 @@ protected:
|
||||||
|
|
||||||
class RilServiceInfoDataItemBase : public IDataItemCore {
|
class RilServiceInfoDataItemBase : public IDataItemCore {
|
||||||
public:
|
public:
|
||||||
RilServiceInfoDataItemBase() :
|
inline RilServiceInfoDataItemBase() :
|
||||||
mId(RILSERVICEINFO_DATA_ITEM_ID) {}
|
mData(nullptr), mId(RILSERVICEINFO_DATA_ITEM_ID) {}
|
||||||
virtual ~RilServiceInfoDataItemBase() {}
|
inline virtual ~RilServiceInfoDataItemBase() { if (nullptr != mData) free(mData); }
|
||||||
inline virtual DataItemId getId() { return mId; }
|
inline virtual DataItemId getId() { return mId; }
|
||||||
virtual void stringify(string& /*valueStr*/) {}
|
virtual void stringify(string& /*valueStr*/) {}
|
||||||
virtual int32_t copy(IDataItemCore* /*src*/, bool* /*dataItemCopied = NULL*/) {return 1;}
|
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:
|
protected:
|
||||||
DataItemId mId;
|
DataItemId mId;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RilCellInfoDataItemBase : public IDataItemCore {
|
class RilCellInfoDataItemBase : public IDataItemCore {
|
||||||
public:
|
public:
|
||||||
RilCellInfoDataItemBase() :
|
inline RilCellInfoDataItemBase() :
|
||||||
mId(RILCELLINFO_DATA_ITEM_ID) {}
|
mData(nullptr), mId(RILCELLINFO_DATA_ITEM_ID) {}
|
||||||
virtual ~RilCellInfoDataItemBase() {}
|
inline virtual ~RilCellInfoDataItemBase() { if (nullptr != mData) free(mData); }
|
||||||
inline virtual DataItemId getId() { return mId; }
|
inline virtual DataItemId getId() { return mId; }
|
||||||
virtual void stringify(string& /*valueStr*/) {}
|
virtual void stringify(string& /*valueStr*/) {}
|
||||||
virtual int32_t copy(IDataItemCore* /*src*/, bool* /*dataItemCopied = NULL*/) {return 1;}
|
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:
|
protected:
|
||||||
DataItemId mId;
|
DataItemId mId;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue