KMbox

mboxentry.cpp
1/*
2 SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "mboxentry.h"
8
9#include "mboxentry_p.h"
10
11using namespace KMBox;
12
14 : d(new MBoxEntryPrivate)
15{
16}
17
18MBoxEntry::MBoxEntry(quint64 offset)
19 : d(new MBoxEntryPrivate)
20{
21 d->mOffset = offset;
22}
23
25 : d(other.d)
26{
27}
28
32
34{
35 if (this != &other) {
36 d = other.d;
37 }
38
39 return *this;
40}
41
42bool MBoxEntry::operator==(const MBoxEntry &other) const
43{
44 return d->mOffset == other.d->mOffset;
45}
46
47bool MBoxEntry::operator!=(const MBoxEntry &other) const
48{
49 return !(other == *this);
50}
51
53{
54 return (d->mOffset != 0) && (d->mMessageSize != 0);
55}
56
58{
59 return d->mOffset;
60}
61
63{
64 return d->mMessageSize;
65}
66
68{
69 return d->mSeparatorSize;
70}
A class that encapsulates an entry of a MBox.
Definition mboxentry.h:25
~MBoxEntry()
Destroys the mbox entry object.
Definition mboxentry.cpp:29
MBoxEntry()
Creates an invalid mbox entry object.
Definition mboxentry.cpp:13
quint64 separatorSize() const
Returns the separator size of the message that is referenced by this mbox entry object.
Definition mboxentry.cpp:67
bool operator==(const MBoxEntry &other) const
Returns whether this mbox entry object is equal to an other.
Definition mboxentry.cpp:42
quint64 messageOffset() const
Returns the offset of the message that is referenced by this mbox entry object.
Definition mboxentry.cpp:57
bool isValid() const
Returns whether this is a valid mbox entry object.
Definition mboxentry.cpp:52
quint64 messageSize() const
Returns the size of the message that is referenced by this mbox entry object.
Definition mboxentry.cpp:62
bool operator!=(const MBoxEntry &other) const
Returns whether this mbox entry object is not equal to an other.
Definition mboxentry.cpp:47
MBoxEntry & operator=(const MBoxEntry &other)
Replaces this mbox entry object with an other object.
Definition mboxentry.cpp:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:58:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.