mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
feat(core): use other instead of src/obj name on operators and copy constructors (uniform syntax)
This commit is contained in:
parent
cb45d54d1a
commit
709dceac26
29 changed files with 251 additions and 251 deletions
|
|
@ -68,9 +68,9 @@ Address::Address (const IdentityAddress &identityAddress) : ClonableObject(*new
|
|||
d->internalAddress = sal_address_new(L_STRING_TO_C(uri));
|
||||
}
|
||||
|
||||
Address::Address (const Address &src) : ClonableObject(*new AddressPrivate) {
|
||||
Address::Address (const Address &other) : ClonableObject(*new AddressPrivate) {
|
||||
L_D();
|
||||
SalAddress *salAddress = src.getPrivate()->internalAddress;
|
||||
SalAddress *salAddress = other.getPrivate()->internalAddress;
|
||||
if (salAddress)
|
||||
d->internalAddress = sal_address_clone(salAddress);
|
||||
}
|
||||
|
|
@ -81,28 +81,28 @@ Address::~Address () {
|
|||
sal_address_destroy(d->internalAddress);
|
||||
}
|
||||
|
||||
Address &Address::operator= (const Address &src) {
|
||||
Address &Address::operator= (const Address &other) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
if (this != &other) {
|
||||
if (d->internalAddress)
|
||||
sal_address_destroy(d->internalAddress);
|
||||
SalAddress *salAddress = src.getPrivate()->internalAddress;
|
||||
SalAddress *salAddress = other.getPrivate()->internalAddress;
|
||||
d->internalAddress = salAddress ? sal_address_clone(salAddress) : nullptr;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool Address::operator== (const Address &address) const {
|
||||
return asString() == address.asString();
|
||||
bool Address::operator== (const Address &other) const {
|
||||
return asString() == other.asString();
|
||||
}
|
||||
|
||||
bool Address::operator!= (const Address &address) const {
|
||||
return !(*this == address);
|
||||
bool Address::operator!= (const Address &other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool Address::operator< (const Address &address) const {
|
||||
return asString() < address.asString();
|
||||
bool Address::operator< (const Address &other) const {
|
||||
return asString() < other.asString();
|
||||
}
|
||||
|
||||
bool Address::isValid () const {
|
||||
|
|
|
|||
|
|
@ -42,15 +42,15 @@ class LINPHONE_PUBLIC Address : public ClonableObject {
|
|||
public:
|
||||
explicit Address (const std::string &address = "");
|
||||
Address (const IdentityAddress &identityAddress);
|
||||
Address (const Address &src);
|
||||
Address (const Address &other);
|
||||
~Address ();
|
||||
|
||||
Address &operator= (const Address &src);
|
||||
Address &operator= (const Address &other);
|
||||
|
||||
bool operator== (const Address &address) const;
|
||||
bool operator!= (const Address &address) const;
|
||||
bool operator== (const Address &other) const;
|
||||
bool operator!= (const Address &other) const;
|
||||
|
||||
bool operator< (const Address &address) const;
|
||||
bool operator< (const Address &other) const;
|
||||
|
||||
bool isValid () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,35 +53,35 @@ IdentityAddress::IdentityAddress (const Address &address) : ClonableObject(*new
|
|||
d->gruu = address.getUriParamValue("gr");
|
||||
}
|
||||
|
||||
IdentityAddress::IdentityAddress (const IdentityAddress &src) : ClonableObject(*new IdentityAddressPrivate) {
|
||||
IdentityAddress::IdentityAddress (const IdentityAddress &other) : ClonableObject(*new IdentityAddressPrivate) {
|
||||
L_D();
|
||||
d->scheme = src.getScheme();
|
||||
d->username = src.getUsername();
|
||||
d->domain = src.getDomain();
|
||||
d->gruu = src.getGruu();
|
||||
d->scheme = other.getScheme();
|
||||
d->username = other.getUsername();
|
||||
d->domain = other.getDomain();
|
||||
d->gruu = other.getGruu();
|
||||
}
|
||||
|
||||
IdentityAddress &IdentityAddress::operator= (const IdentityAddress &src) {
|
||||
IdentityAddress &IdentityAddress::operator= (const IdentityAddress &other) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
d->scheme = src.getScheme();
|
||||
d->username = src.getUsername();
|
||||
d->domain = src.getDomain();
|
||||
d->gruu = src.getGruu();
|
||||
if (this != &other) {
|
||||
d->scheme = other.getScheme();
|
||||
d->username = other.getUsername();
|
||||
d->domain = other.getDomain();
|
||||
d->gruu = other.getGruu();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool IdentityAddress::operator== (const IdentityAddress &address) const {
|
||||
return asString() == address.asString();
|
||||
bool IdentityAddress::operator== (const IdentityAddress &other) const {
|
||||
return asString() == other.asString();
|
||||
}
|
||||
|
||||
bool IdentityAddress::operator!= (const IdentityAddress &address) const {
|
||||
return !(*this == address);
|
||||
bool IdentityAddress::operator!= (const IdentityAddress &other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool IdentityAddress::operator< (const IdentityAddress &address) const {
|
||||
return asString() < address.asString();
|
||||
bool IdentityAddress::operator< (const IdentityAddress &other) const {
|
||||
return asString() < other.asString();
|
||||
}
|
||||
|
||||
bool IdentityAddress::isValid () const {
|
||||
|
|
|
|||
|
|
@ -33,15 +33,15 @@ class LINPHONE_PUBLIC IdentityAddress : public ClonableObject {
|
|||
public:
|
||||
explicit IdentityAddress (const std::string &address = "");
|
||||
IdentityAddress (const Address &address);
|
||||
IdentityAddress (const IdentityAddress &src);
|
||||
IdentityAddress (const IdentityAddress &other);
|
||||
~IdentityAddress () = default;
|
||||
|
||||
IdentityAddress &operator= (const IdentityAddress &src);
|
||||
IdentityAddress &operator= (const IdentityAddress &other);
|
||||
|
||||
bool operator== (const IdentityAddress &address) const;
|
||||
bool operator!= (const IdentityAddress &address) const;
|
||||
bool operator== (const IdentityAddress &other) const;
|
||||
bool operator!= (const IdentityAddress &other) const;
|
||||
|
||||
bool operator< (const IdentityAddress &address) const;
|
||||
bool operator< (const IdentityAddress &other) const;
|
||||
|
||||
bool isValid () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,19 +48,19 @@ ChatRoomId::ChatRoomId (
|
|||
|
||||
L_USE_DEFAULT_CLONABLE_OBJECT_SHARED_IMPL(ChatRoomId);
|
||||
|
||||
bool ChatRoomId::operator== (const ChatRoomId &chatRoomId) const {
|
||||
bool ChatRoomId::operator== (const ChatRoomId &other) const {
|
||||
L_D();
|
||||
const ChatRoomIdPrivate *dChatRoomId = chatRoomId.getPrivate();
|
||||
const ChatRoomIdPrivate *dChatRoomId = other.getPrivate();
|
||||
return d->peerAddress == dChatRoomId->peerAddress && d->localAddress == dChatRoomId->localAddress;
|
||||
}
|
||||
|
||||
bool ChatRoomId::operator!= (const ChatRoomId &chatRoomId) const {
|
||||
return !(*this == chatRoomId);
|
||||
bool ChatRoomId::operator!= (const ChatRoomId &other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool ChatRoomId::operator< (const ChatRoomId &chatRoomId) const {
|
||||
bool ChatRoomId::operator< (const ChatRoomId &other) const {
|
||||
L_D();
|
||||
const ChatRoomIdPrivate *dChatRoomId = chatRoomId.getPrivate();
|
||||
const ChatRoomIdPrivate *dChatRoomId = other.getPrivate();
|
||||
return d->peerAddress < dChatRoomId->peerAddress
|
||||
|| (d->peerAddress == dChatRoomId->peerAddress && d->localAddress < dChatRoomId->localAddress);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ class LINPHONE_PUBLIC ChatRoomId : public ClonableObject {
|
|||
public:
|
||||
ChatRoomId ();
|
||||
ChatRoomId (const IdentityAddress &peerAddress, const IdentityAddress &localAddress);
|
||||
ChatRoomId (const ChatRoomId &src);
|
||||
ChatRoomId (const ChatRoomId &other);
|
||||
|
||||
ChatRoomId &operator= (const ChatRoomId &src);
|
||||
ChatRoomId &operator= (const ChatRoomId &other);
|
||||
|
||||
bool operator== (const ChatRoomId &chatRoomId) const;
|
||||
bool operator!= (const ChatRoomId &chatRoomId) const;
|
||||
bool operator== (const ChatRoomId &other) const;
|
||||
bool operator!= (const ChatRoomId &other) const;
|
||||
|
||||
bool operator< (const ChatRoomId &chatRoomId) const;
|
||||
bool operator< (const ChatRoomId &other) const;
|
||||
|
||||
const IdentityAddress &getPeerAddress () const;
|
||||
const IdentityAddress &getLocalAddress () const;
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@ CallSessionParams::CallSessionParams () : ClonableObject(*new CallSessionParamsP
|
|||
|
||||
CallSessionParams::CallSessionParams (CallSessionParamsPrivate &p) : ClonableObject(p) {}
|
||||
|
||||
CallSessionParams::CallSessionParams (const CallSessionParams &src)
|
||||
CallSessionParams::CallSessionParams (const CallSessionParams &other)
|
||||
: ClonableObject(*new CallSessionParamsPrivate) {
|
||||
L_D();
|
||||
d->clone(src.getPrivate());
|
||||
d->clone(other.getPrivate());
|
||||
}
|
||||
|
||||
CallSessionParams::~CallSessionParams () {
|
||||
|
|
@ -77,10 +77,10 @@ CallSessionParams::~CallSessionParams () {
|
|||
sal_custom_header_free(d->customHeaders);
|
||||
}
|
||||
|
||||
CallSessionParams &CallSessionParams::operator= (const CallSessionParams &src) {
|
||||
CallSessionParams &CallSessionParams::operator= (const CallSessionParams &other) {
|
||||
L_D();
|
||||
if (this != &src)
|
||||
d->clone(src.getPrivate());
|
||||
if (this != &other)
|
||||
d->clone(other.getPrivate());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ class CallSessionParams : public ClonableObject {
|
|||
|
||||
public:
|
||||
CallSessionParams ();
|
||||
CallSessionParams (const CallSessionParams &src);
|
||||
CallSessionParams (const CallSessionParams &other);
|
||||
virtual ~CallSessionParams ();
|
||||
|
||||
CallSessionParams &operator= (const CallSessionParams &src);
|
||||
CallSessionParams &operator= (const CallSessionParams &other);
|
||||
|
||||
virtual void initDefault (const std::shared_ptr<Core> &core);
|
||||
|
||||
|
|
|
|||
|
|
@ -203,11 +203,11 @@ MediaSessionParams::MediaSessionParams () : CallSessionParams(*new MediaSessionP
|
|||
memset(d->customSdpMediaAttributes, 0, sizeof(d->customSdpMediaAttributes));
|
||||
}
|
||||
|
||||
MediaSessionParams::MediaSessionParams (const MediaSessionParams &src)
|
||||
MediaSessionParams::MediaSessionParams (const MediaSessionParams &other)
|
||||
: CallSessionParams(*new MediaSessionParamsPrivate) {
|
||||
L_D();
|
||||
memset(d->customSdpMediaAttributes, 0, sizeof(d->customSdpMediaAttributes));
|
||||
d->clone(src.getPrivate());
|
||||
d->clone(other.getPrivate());
|
||||
}
|
||||
|
||||
MediaSessionParams::~MediaSessionParams () {
|
||||
|
|
@ -215,10 +215,10 @@ MediaSessionParams::~MediaSessionParams () {
|
|||
d->clean();
|
||||
}
|
||||
|
||||
MediaSessionParams &MediaSessionParams::operator= (const MediaSessionParams &src) {
|
||||
MediaSessionParams &MediaSessionParams::operator= (const MediaSessionParams &other) {
|
||||
L_D();
|
||||
if (this != &src)
|
||||
d->clone(src.getPrivate());
|
||||
if (this != &other)
|
||||
d->clone(other.getPrivate());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ class MediaSessionParams : public CallSessionParams {
|
|||
|
||||
public:
|
||||
MediaSessionParams ();
|
||||
MediaSessionParams (const MediaSessionParams &src);
|
||||
MediaSessionParams (const MediaSessionParams &other);
|
||||
virtual ~MediaSessionParams ();
|
||||
|
||||
MediaSessionParams &operator= (const MediaSessionParams &src);
|
||||
MediaSessionParams &operator= (const MediaSessionParams &other);
|
||||
|
||||
void initDefault (const std::shared_ptr<Core> &core) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -91,26 +91,26 @@ ContentType::ContentType (
|
|||
setParameter(parameter);
|
||||
}
|
||||
|
||||
ContentType::ContentType (const ContentType &src) : ContentType(src.getType(), src.getSubType(), src.getParameter()) {}
|
||||
ContentType::ContentType (const ContentType &other) : ContentType(other.getType(), other.getSubType(), other.getParameter()) {}
|
||||
|
||||
ContentType &ContentType::operator= (const ContentType &src) {
|
||||
if (this != &src) {
|
||||
setType(src.getType());
|
||||
setSubType(src.getSubType());
|
||||
setParameter(src.getParameter());
|
||||
ContentType &ContentType::operator= (const ContentType &other) {
|
||||
if (this != &other) {
|
||||
setType(other.getType());
|
||||
setSubType(other.getSubType());
|
||||
setParameter(other.getParameter());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool ContentType::operator== (const ContentType &contentType) const {
|
||||
return getType() == contentType.getType() &&
|
||||
getSubType() == contentType.getSubType() &&
|
||||
getParameter() == contentType.getParameter();
|
||||
bool ContentType::operator== (const ContentType &other) const {
|
||||
return getType() == other.getType() &&
|
||||
getSubType() == other.getSubType() &&
|
||||
getParameter() == other.getParameter();
|
||||
}
|
||||
|
||||
bool ContentType::operator!= (const ContentType &contentType) const {
|
||||
return !(*this == contentType);
|
||||
bool ContentType::operator!= (const ContentType &other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
const string &ContentType::getType () const {
|
||||
|
|
|
|||
|
|
@ -33,17 +33,17 @@ public:
|
|||
explicit ContentType (const std::string &contentType = "");
|
||||
ContentType (const std::string &type, const std::string &subType);
|
||||
ContentType (const std::string &type, const std::string &subType, const std::string ¶meter);
|
||||
ContentType (const ContentType &src);
|
||||
ContentType (const ContentType &other);
|
||||
|
||||
ContentType &operator= (const ContentType &src);
|
||||
ContentType &operator= (const ContentType &other);
|
||||
|
||||
bool operator== (const ContentType &contentType) const;
|
||||
bool operator!= (const ContentType &contentType) const;
|
||||
bool operator== (const ContentType &other) const;
|
||||
bool operator!= (const ContentType &other) const;
|
||||
|
||||
// Delete these operators to prevent putting complicated content-type strings
|
||||
// in the code. Instead define static const ContentType objects below.
|
||||
bool operator== (const std::string &contentType) const = delete;
|
||||
bool operator!= (const std::string &contentType) const = delete;
|
||||
bool operator== (const std::string &other) const = delete;
|
||||
bool operator!= (const std::string &other) const = delete;
|
||||
|
||||
bool isEmpty () const;
|
||||
bool isValid () const;
|
||||
|
|
|
|||
|
|
@ -34,18 +34,18 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
Content::Content () : ClonableObject(*new ContentPrivate) {}
|
||||
|
||||
Content::Content (const Content &src) : ClonableObject(*new ContentPrivate), AppDataContainer(src) {
|
||||
Content::Content (const Content &other) : ClonableObject(*new ContentPrivate), AppDataContainer(other) {
|
||||
L_D();
|
||||
d->body = src.getBody();
|
||||
d->contentType = src.getContentType();
|
||||
d->contentDisposition = src.getContentDisposition();
|
||||
d->body = other.getBody();
|
||||
d->contentType = other.getContentType();
|
||||
d->contentDisposition = other.getContentDisposition();
|
||||
}
|
||||
|
||||
Content::Content (Content &&src) : ClonableObject(*new ContentPrivate), AppDataContainer(move(src)) {
|
||||
Content::Content (Content &&other) : ClonableObject(*new ContentPrivate), AppDataContainer(move(other)) {
|
||||
L_D();
|
||||
d->body = move(src.getPrivate()->body);
|
||||
d->contentType = move(src.getPrivate()->contentType);
|
||||
d->contentDisposition = move(src.getPrivate()->contentDisposition);
|
||||
d->body = move(other.getPrivate()->body);
|
||||
d->contentType = move(other.getPrivate()->contentType);
|
||||
d->contentDisposition = move(other.getPrivate()->contentDisposition);
|
||||
}
|
||||
|
||||
Content::Content (ContentPrivate &p) : ClonableObject(p) {}
|
||||
|
|
@ -59,32 +59,32 @@ Content::~Content () {
|
|||
d->body.assign(d->body.size(), 0);
|
||||
}
|
||||
|
||||
Content &Content::operator= (const Content &src) {
|
||||
Content &Content::operator= (const Content &other) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
d->body = src.getBody();
|
||||
d->contentType = src.getContentType();
|
||||
d->contentDisposition = src.getContentDisposition();
|
||||
AppDataContainer::operator=(src);
|
||||
if (this != &other) {
|
||||
d->body = other.getBody();
|
||||
d->contentType = other.getContentType();
|
||||
d->contentDisposition = other.getContentDisposition();
|
||||
AppDataContainer::operator=(other);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Content &Content::operator= (Content &&src) {
|
||||
Content &Content::operator= (Content &&other) {
|
||||
L_D();
|
||||
d->body = move(src.getPrivate()->body);
|
||||
d->contentType = move(src.getPrivate()->contentType);
|
||||
d->contentDisposition = move(src.getPrivate()->contentDisposition);
|
||||
AppDataContainer::operator=(move(src));
|
||||
d->body = move(other.getPrivate()->body);
|
||||
d->contentType = move(other.getPrivate()->contentType);
|
||||
d->contentDisposition = move(other.getPrivate()->contentDisposition);
|
||||
AppDataContainer::operator=(move(other));
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool Content::operator== (const Content &content) const {
|
||||
bool Content::operator== (const Content &other) const {
|
||||
L_D();
|
||||
return d->contentType == content.getContentType() &&
|
||||
d->body == content.getBody() &&
|
||||
d->contentDisposition == content.getContentDisposition();
|
||||
return d->contentType == other.getContentType() &&
|
||||
d->body == other.getBody() &&
|
||||
d->contentDisposition == other.getContentDisposition();
|
||||
}
|
||||
|
||||
const ContentType &Content::getContentType () const {
|
||||
|
|
|
|||
|
|
@ -37,14 +37,14 @@ class ContentPrivate;
|
|||
class LINPHONE_PUBLIC Content : public ClonableObject, public AppDataContainer {
|
||||
public:
|
||||
Content ();
|
||||
Content (const Content &src);
|
||||
Content (Content &&src);
|
||||
Content (const Content &other);
|
||||
Content (Content &&other);
|
||||
~Content ();
|
||||
|
||||
Content &operator= (const Content &src);
|
||||
Content &operator= (Content &&src);
|
||||
Content &operator= (const Content &other);
|
||||
Content &operator= (Content &&other);
|
||||
|
||||
bool operator== (const Content &content) const;
|
||||
bool operator== (const Content &other) const;
|
||||
|
||||
const ContentType &getContentType () const;
|
||||
void setContentType (const ContentType &contentType);
|
||||
|
|
|
|||
|
|
@ -43,52 +43,52 @@ public:
|
|||
|
||||
FileContent::FileContent () : Content(*new FileContentPrivate) {}
|
||||
|
||||
FileContent::FileContent (const FileContent &src) : Content(*new FileContentPrivate) {
|
||||
FileContent::FileContent (const FileContent &other) : Content(*new FileContentPrivate) {
|
||||
L_D();
|
||||
d->fileName = src.getFileName();
|
||||
d->filePath = src.getFilePath();
|
||||
d->fileSize = src.getFileSize();
|
||||
d->fileKey = src.getFileKey();
|
||||
d->fileName = other.getFileName();
|
||||
d->filePath = other.getFilePath();
|
||||
d->fileSize = other.getFileSize();
|
||||
d->fileKey = other.getFileKey();
|
||||
}
|
||||
|
||||
FileContent::FileContent (FileContent &&src) : Content(*new FileContentPrivate) {
|
||||
FileContent::FileContent (FileContent &&other) : Content(*new FileContentPrivate) {
|
||||
L_D();
|
||||
d->fileName = move(src.getPrivate()->fileName);
|
||||
d->filePath = move(src.getPrivate()->filePath);
|
||||
d->fileSize = move(src.getPrivate()->fileSize);
|
||||
d->fileKey = move(src.getPrivate()->fileKey);
|
||||
d->fileName = move(other.getPrivate()->fileName);
|
||||
d->filePath = move(other.getPrivate()->filePath);
|
||||
d->fileSize = move(other.getPrivate()->fileSize);
|
||||
d->fileKey = move(other.getPrivate()->fileKey);
|
||||
}
|
||||
|
||||
FileContent &FileContent::operator= (const FileContent &src) {
|
||||
FileContent &FileContent::operator= (const FileContent &other) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
Content::operator=(src);
|
||||
d->fileName = src.getFileName();
|
||||
d->filePath = src.getFilePath();
|
||||
d->fileSize = src.getFileSize();
|
||||
d->fileKey = src.getFileKey();
|
||||
if (this != &other) {
|
||||
Content::operator=(other);
|
||||
d->fileName = other.getFileName();
|
||||
d->filePath = other.getFilePath();
|
||||
d->fileSize = other.getFileSize();
|
||||
d->fileKey = other.getFileKey();
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
FileContent &FileContent::operator= (FileContent &&src) {
|
||||
FileContent &FileContent::operator= (FileContent &&other) {
|
||||
L_D();
|
||||
Content::operator=(move(src));
|
||||
d->fileName = move(src.getPrivate()->fileName);
|
||||
d->filePath = move(src.getPrivate()->filePath);
|
||||
d->fileSize = move(src.getPrivate()->fileSize);
|
||||
d->fileKey = move(src.getPrivate()->fileKey);
|
||||
Content::operator=(move(other));
|
||||
d->fileName = move(other.getPrivate()->fileName);
|
||||
d->filePath = move(other.getPrivate()->filePath);
|
||||
d->fileSize = move(other.getPrivate()->fileSize);
|
||||
d->fileKey = move(other.getPrivate()->fileKey);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool FileContent::operator== (const FileContent &content) const {
|
||||
bool FileContent::operator== (const FileContent &other) const {
|
||||
L_D();
|
||||
return Content::operator==(content) &&
|
||||
d->fileName == content.getFileName() &&
|
||||
d->filePath == content.getFilePath() &&
|
||||
d->fileSize == content.getFileSize() &&
|
||||
d->fileKey == content.getFileKey();
|
||||
return Content::operator==(other) &&
|
||||
d->fileName == other.getFileName() &&
|
||||
d->filePath == other.getFilePath() &&
|
||||
d->fileSize == other.getFileSize() &&
|
||||
d->fileKey == other.getFileKey();
|
||||
}
|
||||
|
||||
void FileContent::setFileSize (size_t size) {
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@ class FileContentPrivate;
|
|||
class LINPHONE_PUBLIC FileContent : public Content {
|
||||
public:
|
||||
FileContent ();
|
||||
FileContent (const FileContent &src);
|
||||
FileContent (FileContent &&src);
|
||||
FileContent (const FileContent &other);
|
||||
FileContent (FileContent &&other);
|
||||
|
||||
FileContent &operator= (const FileContent &src);
|
||||
FileContent &operator= (FileContent &&src);
|
||||
FileContent &operator= (const FileContent &other);
|
||||
FileContent &operator= (FileContent &&other);
|
||||
|
||||
bool operator== (const FileContent &content) const;
|
||||
bool operator== (const FileContent &other) const;
|
||||
|
||||
void setFileSize (size_t size);
|
||||
size_t getFileSize () const;
|
||||
|
|
|
|||
|
|
@ -44,56 +44,56 @@ public:
|
|||
|
||||
FileTransferContent::FileTransferContent () : Content(*new FileTransferContentPrivate) {}
|
||||
|
||||
FileTransferContent::FileTransferContent (const FileTransferContent &src) : Content(*new FileTransferContentPrivate) {
|
||||
FileTransferContent::FileTransferContent (const FileTransferContent &other) : Content(*new FileTransferContentPrivate) {
|
||||
L_D();
|
||||
d->fileName = src.getFileName();
|
||||
d->fileUrl = src.getFileUrl();
|
||||
d->filePath = src.getFilePath();
|
||||
d->fileContent = src.getFileContent();
|
||||
d->fileSize = src.getFileSize();
|
||||
d->fileName = other.getFileName();
|
||||
d->fileUrl = other.getFileUrl();
|
||||
d->filePath = other.getFilePath();
|
||||
d->fileContent = other.getFileContent();
|
||||
d->fileSize = other.getFileSize();
|
||||
}
|
||||
|
||||
FileTransferContent::FileTransferContent (FileTransferContent &&src) : Content(*new FileTransferContentPrivate) {
|
||||
FileTransferContent::FileTransferContent (FileTransferContent &&other) : Content(*new FileTransferContentPrivate) {
|
||||
L_D();
|
||||
d->fileName = move(src.getPrivate()->fileName);
|
||||
d->fileUrl = move(src.getPrivate()->fileUrl);
|
||||
d->filePath = move(src.getPrivate()->filePath);
|
||||
d->fileContent = move(src.getPrivate()->fileContent);
|
||||
d->fileSize = move(src.getPrivate()->fileSize);
|
||||
d->fileName = move(other.getPrivate()->fileName);
|
||||
d->fileUrl = move(other.getPrivate()->fileUrl);
|
||||
d->filePath = move(other.getPrivate()->filePath);
|
||||
d->fileContent = move(other.getPrivate()->fileContent);
|
||||
d->fileSize = move(other.getPrivate()->fileSize);
|
||||
}
|
||||
|
||||
FileTransferContent &FileTransferContent::operator= (const FileTransferContent &src) {
|
||||
FileTransferContent &FileTransferContent::operator= (const FileTransferContent &other) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
Content::operator=(src);
|
||||
d->fileName = src.getFileName();
|
||||
d->fileUrl = src.getFileUrl();
|
||||
d->filePath = src.getFilePath();
|
||||
d->fileContent = src.getFileContent();
|
||||
d->fileSize = src.getFileSize();
|
||||
if (this != &other) {
|
||||
Content::operator=(other);
|
||||
d->fileName = other.getFileName();
|
||||
d->fileUrl = other.getFileUrl();
|
||||
d->filePath = other.getFilePath();
|
||||
d->fileContent = other.getFileContent();
|
||||
d->fileSize = other.getFileSize();
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
FileTransferContent &FileTransferContent::operator= (FileTransferContent &&src) {
|
||||
FileTransferContent &FileTransferContent::operator= (FileTransferContent &&other) {
|
||||
L_D();
|
||||
Content::operator=(move(src));
|
||||
d->fileName = move(src.getPrivate()->fileName);
|
||||
d->fileUrl = move(src.getPrivate()->fileUrl);
|
||||
d->filePath = move(src.getPrivate()->filePath);
|
||||
d->fileContent = move(src.getPrivate()->fileContent);
|
||||
d->fileSize = move(src.getPrivate()->fileSize);
|
||||
Content::operator=(move(other));
|
||||
d->fileName = move(other.getPrivate()->fileName);
|
||||
d->fileUrl = move(other.getPrivate()->fileUrl);
|
||||
d->filePath = move(other.getPrivate()->filePath);
|
||||
d->fileContent = move(other.getPrivate()->fileContent);
|
||||
d->fileSize = move(other.getPrivate()->fileSize);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool FileTransferContent::operator== (const FileTransferContent &content) const {
|
||||
bool FileTransferContent::operator== (const FileTransferContent &other) const {
|
||||
L_D();
|
||||
return Content::operator==(content) &&
|
||||
d->fileName == content.getFileName() &&
|
||||
d->fileUrl == content.getFileUrl() &&
|
||||
d->filePath == content.getFilePath() &&
|
||||
d->fileSize == content.getFileSize();
|
||||
return Content::operator==(other) &&
|
||||
d->fileName == other.getFileName() &&
|
||||
d->fileUrl == other.getFileUrl() &&
|
||||
d->filePath == other.getFilePath() &&
|
||||
d->fileSize == other.getFileSize();
|
||||
}
|
||||
|
||||
void FileTransferContent::setFileName (const string &name) {
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@ class FileTransferContentPrivate;
|
|||
class LINPHONE_PUBLIC FileTransferContent : public Content {
|
||||
public:
|
||||
FileTransferContent ();
|
||||
FileTransferContent (const FileTransferContent &src);
|
||||
FileTransferContent (FileTransferContent &&src);
|
||||
FileTransferContent (const FileTransferContent &other);
|
||||
FileTransferContent (FileTransferContent &&other);
|
||||
|
||||
FileTransferContent &operator= (const FileTransferContent &src);
|
||||
FileTransferContent &operator= (FileTransferContent &&src);
|
||||
FileTransferContent &operator= (const FileTransferContent &other);
|
||||
FileTransferContent &operator= (FileTransferContent &&other);
|
||||
|
||||
bool operator== (const FileTransferContent &content) const;
|
||||
bool operator== (const FileTransferContent &other) const;
|
||||
|
||||
void setFileName (const std::string &name);
|
||||
const std::string &getFileName () const;
|
||||
|
|
|
|||
|
|
@ -37,23 +37,23 @@ MainDbKey::MainDbKey (const shared_ptr<Core> &core, long long storageId) : MainD
|
|||
d->storageId = storageId;
|
||||
}
|
||||
|
||||
MainDbKey::MainDbKey (const MainDbKey &src) : MainDbKey() {
|
||||
MainDbKey::MainDbKey (const MainDbKey &other) : MainDbKey() {
|
||||
L_D();
|
||||
const MainDbKeyPrivate *dSrc = src.getPrivate();
|
||||
const MainDbKeyPrivate *dOther = other.getPrivate();
|
||||
|
||||
d->core = dSrc->core;
|
||||
d->storageId = dSrc->storageId;
|
||||
d->core = dOther->core;
|
||||
d->storageId = dOther->storageId;
|
||||
}
|
||||
|
||||
MainDbKey::~MainDbKey () {}
|
||||
|
||||
MainDbKey &MainDbKey::operator= (const MainDbKey &src) {
|
||||
MainDbKey &MainDbKey::operator= (const MainDbKey &other) {
|
||||
L_D();
|
||||
|
||||
if (this != &src) {
|
||||
const MainDbKeyPrivate *dSrc = src.getPrivate();
|
||||
d->core = dSrc->core;
|
||||
d->storageId = dSrc->storageId;
|
||||
if (this != &other) {
|
||||
const MainDbKeyPrivate *dOther = other.getPrivate();
|
||||
d->core = dOther->core;
|
||||
d->storageId = dOther->storageId;
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ class MainDbKey : public ClonableObject {
|
|||
public:
|
||||
MainDbKey ();
|
||||
MainDbKey (const std::shared_ptr<Core> &core, long long storageId);
|
||||
MainDbKey (const MainDbKey &src);
|
||||
MainDbKey (const MainDbKey &other);
|
||||
virtual ~MainDbKey () = 0;
|
||||
|
||||
MainDbKey &operator= (const MainDbKey &src);
|
||||
MainDbKey &operator= (const MainDbKey &other);
|
||||
|
||||
bool isValid () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ class DbSession : public ClonableObject {
|
|||
public:
|
||||
DbSession ();
|
||||
explicit DbSession (const std::string &uri);
|
||||
DbSession (const DbSession &src);
|
||||
DbSession (const DbSession &other);
|
||||
|
||||
DbSession &operator= (const DbSession &src);
|
||||
DbSession &operator= (const DbSession &other);
|
||||
|
||||
operator bool () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -283,24 +283,24 @@ DialPlan::DialPlan (
|
|||
d->internationalCallPrefix = icp;
|
||||
}
|
||||
|
||||
DialPlan::DialPlan (const DialPlan &src) : ClonableObject(*new DialPlanPrivate) {
|
||||
DialPlan::DialPlan (const DialPlan &other) : ClonableObject(*new DialPlanPrivate) {
|
||||
L_D();
|
||||
d->country = src.getCountry();
|
||||
d->isoCountryCode = src.getIsoCountryCode();
|
||||
d->countryCallingCode = src.getCountryCallingCode();
|
||||
d->nationalNumberLength = src.getNationalNumberLength();
|
||||
d->internationalCallPrefix = src.getInternationalCallPrefix();
|
||||
d->country = other.getCountry();
|
||||
d->isoCountryCode = other.getIsoCountryCode();
|
||||
d->countryCallingCode = other.getCountryCallingCode();
|
||||
d->nationalNumberLength = other.getNationalNumberLength();
|
||||
d->internationalCallPrefix = other.getInternationalCallPrefix();
|
||||
}
|
||||
|
||||
DialPlan &DialPlan::operator= (const DialPlan &src) {
|
||||
DialPlan &DialPlan::operator= (const DialPlan &other) {
|
||||
L_D();
|
||||
|
||||
if (this != &src) {
|
||||
d->country = src.getCountry();
|
||||
d->isoCountryCode = src.getIsoCountryCode();
|
||||
d->countryCallingCode = src.getCountryCallingCode();
|
||||
d->nationalNumberLength = src.getNationalNumberLength();
|
||||
d->internationalCallPrefix = src.getInternationalCallPrefix();
|
||||
if (this != &other) {
|
||||
d->country = other.getCountry();
|
||||
d->isoCountryCode = other.getIsoCountryCode();
|
||||
d->countryCallingCode = other.getCountryCallingCode();
|
||||
d->nationalNumberLength = other.getNationalNumberLength();
|
||||
d->internationalCallPrefix = other.getInternationalCallPrefix();
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ public:
|
|||
int nnl = 0,
|
||||
const std::string &icp = ""
|
||||
);
|
||||
DialPlan (const DialPlan &src);
|
||||
DialPlan (const DialPlan &other);
|
||||
|
||||
DialPlan &operator= (const DialPlan &src);
|
||||
DialPlan &operator= (const DialPlan &other);
|
||||
|
||||
const std::string &getCountry () const;
|
||||
const std::string &getIsoCountryCode () const;
|
||||
|
|
|
|||
|
|
@ -41,19 +41,19 @@ AppDataContainer::AppDataContainer () : mPrivate(new AppDataContainerPrivate) {
|
|||
d->appData = make_shared<unordered_map<string, string>>();
|
||||
}
|
||||
|
||||
AppDataContainer::AppDataContainer (const AppDataContainer &src) : mPrivate(new AppDataContainerPrivate) {
|
||||
AppDataContainer::AppDataContainer (const AppDataContainer &other) : mPrivate(new AppDataContainerPrivate) {
|
||||
L_D();
|
||||
d->appData = src.getPrivate()->appData;
|
||||
d->appData = other.getPrivate()->appData;
|
||||
}
|
||||
|
||||
AppDataContainer::~AppDataContainer () {
|
||||
delete mPrivate;
|
||||
}
|
||||
|
||||
AppDataContainer &AppDataContainer::operator= (const AppDataContainer &src) {
|
||||
AppDataContainer &AppDataContainer::operator= (const AppDataContainer &other) {
|
||||
L_D();
|
||||
if (this != &src)
|
||||
d->appData = src.getPrivate()->appData;
|
||||
if (this != &other)
|
||||
d->appData = other.getPrivate()->appData;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ class AppDataContainerPrivate;
|
|||
class LINPHONE_PUBLIC AppDataContainer {
|
||||
public:
|
||||
AppDataContainer ();
|
||||
AppDataContainer (const AppDataContainer &src);
|
||||
AppDataContainer (const AppDataContainer &other);
|
||||
virtual ~AppDataContainer ();
|
||||
|
||||
AppDataContainer &operator= (const AppDataContainer &src);
|
||||
AppDataContainer &operator= (const AppDataContainer &other);
|
||||
|
||||
const std::unordered_map<std::string, std::string> &getAppDataMap () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@
|
|||
// =============================================================================
|
||||
|
||||
#define L_USE_DEFAULT_CLONABLE_OBJECT_SHARED_IMPL(CLASS) \
|
||||
CLASS::CLASS (const CLASS &src) : ClonableObject( \
|
||||
const_cast<std::decay<decltype(*src.getPrivate())>::type &>(*src.getPrivate()) \
|
||||
CLASS::CLASS (const CLASS &other) : ClonableObject( \
|
||||
const_cast<std::decay<decltype(*other.getPrivate())>::type &>(*other.getPrivate()) \
|
||||
) {} \
|
||||
CLASS &CLASS::operator= (const CLASS &src) { \
|
||||
if (this != &src) \
|
||||
setRef(*src.getPrivate()); \
|
||||
CLASS &CLASS::operator= (const CLASS &other) { \
|
||||
if (this != &other) \
|
||||
setRef(*other.getPrivate()); \
|
||||
return *this; \
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ class PropertyContainerPrivate;
|
|||
class LINPHONE_PUBLIC PropertyContainer {
|
||||
public:
|
||||
PropertyContainer ();
|
||||
PropertyContainer (const PropertyContainer &src);
|
||||
PropertyContainer (const PropertyContainer &other);
|
||||
virtual ~PropertyContainer ();
|
||||
|
||||
PropertyContainer &operator= (const PropertyContainer &src);
|
||||
PropertyContainer &operator= (const PropertyContainer &other);
|
||||
|
||||
Variant getProperty (const std::string &name) const;
|
||||
void setProperty (const std::string &name, const Variant &value);
|
||||
|
|
|
|||
|
|
@ -92,27 +92,27 @@ Variant::Variant (Type type) : Variant() {
|
|||
d->setType(type);
|
||||
}
|
||||
|
||||
Variant::Variant (const Variant &src) {
|
||||
Variant::Variant (const Variant &other) {
|
||||
// Don't call placement new.
|
||||
L_ASSERT(!mPrivate);
|
||||
mPrivate = new VariantPrivate();
|
||||
|
||||
L_D();
|
||||
|
||||
int type = src.getPrivate()->getType();
|
||||
int type = other.getPrivate()->getType();
|
||||
d->setType(type);
|
||||
|
||||
const VariantPrivate::Value &value = src.getPrivate()->value;
|
||||
const VariantPrivate::Value &value = other.getPrivate()->value;
|
||||
if (type == String)
|
||||
*d->value.str = *value.str;
|
||||
else
|
||||
d->value = value;
|
||||
}
|
||||
|
||||
Variant::Variant (Variant &&src) {
|
||||
Variant::Variant (Variant &&other) {
|
||||
// Don't call placement new.
|
||||
L_ASSERT(!mPrivate);
|
||||
::swap(mPrivate, src.mPrivate);
|
||||
::swap(mPrivate, other.mPrivate);
|
||||
}
|
||||
|
||||
Variant::Variant (int value) : Variant(Int) {
|
||||
|
|
@ -188,31 +188,31 @@ Variant::~Variant () {
|
|||
delete d;
|
||||
}
|
||||
|
||||
bool Variant::operator!= (const Variant &variant) const {
|
||||
bool Variant::operator!= (const Variant &other) const {
|
||||
// TODO.
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Variant::operator< (const Variant &variant) const {
|
||||
bool Variant::operator< (const Variant &other) const {
|
||||
// TODO.
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Variant::operator<= (const Variant &variant) const {
|
||||
bool Variant::operator<= (const Variant &other) const {
|
||||
// TODO.
|
||||
return false;
|
||||
}
|
||||
|
||||
Variant &Variant::operator= (const Variant &variant) {
|
||||
Variant &Variant::operator= (const Variant &other) {
|
||||
L_D();
|
||||
|
||||
if (this != &variant) {
|
||||
if (this != &other) {
|
||||
// Update type.
|
||||
int type = variant.getPrivate()->getType();
|
||||
int type = other.getPrivate()->getType();
|
||||
d->setType(type);
|
||||
|
||||
// Update value.
|
||||
const VariantPrivate::Value &value = variant.getPrivate()->value;
|
||||
const VariantPrivate::Value &value = other.getPrivate()->value;
|
||||
if (type == String)
|
||||
*d->value.str = *value.str;
|
||||
else
|
||||
|
|
@ -222,22 +222,22 @@ Variant &Variant::operator= (const Variant &variant) {
|
|||
return *this;
|
||||
}
|
||||
|
||||
Variant &Variant::operator= (Variant &&variant) {
|
||||
::swap(mPrivate, variant.mPrivate);
|
||||
Variant &Variant::operator= (Variant &&other) {
|
||||
::swap(mPrivate, other.mPrivate);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool Variant::operator== (const Variant &variant) const {
|
||||
bool Variant::operator== (const Variant &other) const {
|
||||
// TODO.
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Variant::operator> (const Variant &variant) const {
|
||||
bool Variant::operator> (const Variant &other) const {
|
||||
// TODO.
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Variant::operator>= (const Variant &variant) const {
|
||||
bool Variant::operator>= (const Variant &other) const {
|
||||
// TODO.
|
||||
return false;
|
||||
}
|
||||
|
|
@ -252,7 +252,7 @@ void Variant::clear () {
|
|||
d->setType(Invalid);
|
||||
}
|
||||
|
||||
void Variant::swap (const Variant &variant) {
|
||||
void Variant::swap (const Variant &other) {
|
||||
// TODO.
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ public:
|
|||
Variant ();
|
||||
Variant (Type type);
|
||||
|
||||
Variant (const Variant &src);
|
||||
Variant (Variant &&src);
|
||||
Variant (const Variant &other);
|
||||
Variant (Variant &&other);
|
||||
|
||||
Variant (int value);
|
||||
Variant (unsigned int value);
|
||||
|
|
@ -87,14 +87,14 @@ public:
|
|||
|
||||
~Variant ();
|
||||
|
||||
bool operator!= (const Variant &variant) const;
|
||||
bool operator< (const Variant &variant) const;
|
||||
bool operator<= (const Variant &variant) const;
|
||||
Variant &operator= (const Variant &variant);
|
||||
Variant &operator= (Variant &&variant);
|
||||
bool operator== (const Variant &variant) const;
|
||||
bool operator> (const Variant &variant) const;
|
||||
bool operator>= (const Variant &variant) const;
|
||||
bool operator!= (const Variant &other) const;
|
||||
bool operator< (const Variant &other) const;
|
||||
bool operator<= (const Variant &other) const;
|
||||
Variant &operator= (const Variant &other);
|
||||
Variant &operator= (Variant &&other);
|
||||
bool operator== (const Variant &other) const;
|
||||
bool operator> (const Variant &other) const;
|
||||
bool operator>= (const Variant &other) const;
|
||||
|
||||
template<typename T>
|
||||
void setValue (const T &value) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue