File indexing completed on 2024-05-12 05:22:15
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #include "object.h" 0010 #include "debug.h" 0011 0012 using namespace KGAPI2; 0013 0014 class Q_DECL_HIDDEN Object::Private 0015 { 0016 public: 0017 Private(); 0018 Private(const Private &other); 0019 0020 QString etag; 0021 }; 0022 0023 Object::Private::Private() 0024 { 0025 } 0026 0027 Object::Private::Private(const Private &other) 0028 : etag(other.etag) 0029 { 0030 } 0031 0032 Object::Object() 0033 : d(new Private()) 0034 { 0035 } 0036 0037 Object::Object(const Object &other) 0038 : d(new Private(*(other.d))) 0039 { 0040 } 0041 0042 Object::~Object() 0043 { 0044 delete d; 0045 } 0046 0047 bool Object::operator==(const Object &other) const 0048 { 0049 if (d->etag != other.d->etag) { 0050 qCDebug(KGAPIDebug) << "ETags don't match"; 0051 return false; 0052 } 0053 return true; 0054 } 0055 0056 void Object::setEtag(const QString &etag) 0057 { 0058 d->etag = etag; 0059 } 0060 0061 QString Object::etag() const 0062 { 0063 return d->etag; 0064 }