equal
deleted
inserted
replaced
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
|
17 |
|
18 #include "emailtrace.h" |
|
19 |
17 #include <QString> |
20 #include <QString> |
18 |
21 |
19 #include "nmmailbox.h" |
22 #include "nmmailbox.h" |
20 |
23 |
21 NmMailboxPrivate::NmMailboxPrivate() |
24 NmMailboxPrivate::NmMailboxPrivate() |
22 { |
25 { |
|
26 NM_FUNCTION; |
23 } |
27 } |
24 |
28 |
25 NmMailboxPrivate::~NmMailboxPrivate() |
29 NmMailboxPrivate::~NmMailboxPrivate() |
26 { |
30 { |
|
31 NM_FUNCTION; |
27 } |
32 } |
28 |
33 |
29 /*! |
34 /*! |
30 \class NmMailbox |
35 \class NmMailbox |
31 \brief Data model for mailbox spesific data |
36 \brief Data model for mailbox spesific data |
34 /*! |
39 /*! |
35 Constructs NmMailbox object with empty data |
40 Constructs NmMailbox object with empty data |
36 */ |
41 */ |
37 NmMailbox::NmMailbox() |
42 NmMailbox::NmMailbox() |
38 { |
43 { |
|
44 NM_FUNCTION; |
|
45 |
39 d = new NmMailboxPrivate(); |
46 d = new NmMailboxPrivate(); |
40 } |
47 } |
41 |
48 |
42 /*! |
49 /*! |
43 Copy constructor |
50 Copy constructor |
44 */ |
51 */ |
45 NmMailbox::NmMailbox(const NmMailbox &mailbox) |
52 NmMailbox::NmMailbox(const NmMailbox &mailbox) |
46 { |
53 { |
|
54 NM_FUNCTION; |
|
55 |
47 d = mailbox.d; |
56 d = mailbox.d; |
48 } |
57 } |
49 |
58 |
50 /*! |
59 /*! |
51 Constructs NmMailbox object from \a mailbox data |
60 Constructs NmMailbox object from \a mailbox data |
52 */ |
61 */ |
53 NmMailbox::NmMailbox(QExplicitlySharedDataPointer<NmMailboxPrivate> mailboxprivate) |
62 NmMailbox::NmMailbox(QExplicitlySharedDataPointer<NmMailboxPrivate> mailboxprivate) |
54 { |
63 { |
|
64 NM_FUNCTION; |
|
65 |
55 d = mailboxprivate; |
66 d = mailboxprivate; |
56 } |
67 } |
57 |
68 |
58 /*! |
69 /*! |
59 Assign data from \a mailbox |
70 Assign data from \a mailbox |
60 */ |
71 */ |
61 NmMailbox &NmMailbox::operator=(const NmMailbox &mailbox) |
72 NmMailbox &NmMailbox::operator=(const NmMailbox &mailbox) |
62 { |
73 { |
|
74 NM_FUNCTION; |
|
75 |
63 if (this != &mailbox) { |
76 if (this != &mailbox) { |
64 d = mailbox.d; |
77 d = mailbox.d; |
65 } |
78 } |
66 return *this; |
79 return *this; |
67 } |
80 } |
69 /*! |
82 /*! |
70 Destructor |
83 Destructor |
71 */ |
84 */ |
72 NmMailbox::~NmMailbox() |
85 NmMailbox::~NmMailbox() |
73 { |
86 { |
|
87 NM_FUNCTION; |
74 } |
88 } |
75 |
89 |
76 /*! |
90 /*! |
77 Returns mailbox id |
91 Returns mailbox id |
78 */ |
92 */ |
79 NmId NmMailbox::id() const |
93 NmId NmMailbox::id() const |
80 { |
94 { |
|
95 NM_FUNCTION; |
|
96 |
81 return d->mId; |
97 return d->mId; |
82 } |
98 } |
83 |
99 |
84 /*! |
100 /*! |
85 Sets mailbox id from \a id |
101 Sets mailbox id from \a id |
86 */ |
102 */ |
87 void NmMailbox::setId(const NmId& id) |
103 void NmMailbox::setId(const NmId& id) |
88 { |
104 { |
|
105 NM_FUNCTION; |
|
106 |
89 d->mId = id; |
107 d->mId = id; |
90 } |
108 } |
91 |
109 |
92 /*! |
110 /*! |
93 Returns mailbox name string |
111 Returns mailbox name string |
94 */ |
112 */ |
95 QString NmMailbox::name() const |
113 QString NmMailbox::name() const |
96 { |
114 { |
|
115 NM_FUNCTION; |
|
116 |
97 return d->mName; |
117 return d->mName; |
98 } |
118 } |
99 |
119 |
100 /*! |
120 /*! |
101 Sets mailbox name from \a name |
121 Sets mailbox name from \a name |
102 */ |
122 */ |
103 void NmMailbox::setName(const QString &name) |
123 void NmMailbox::setName(const QString &name) |
104 { |
124 { |
|
125 NM_FUNCTION; |
|
126 |
105 d->mName = name; |
127 d->mName = name; |
106 } |
128 } |
107 |
129 |
108 /*! |
130 /*! |
109 Equal operator returns true if both NmMailbox objects have same name and id |
131 Equal operator returns true if both NmMailbox objects have same name and id |
110 */ |
132 */ |
111 bool NmMailbox::operator==(const NmMailbox &mailbox) const |
133 bool NmMailbox::operator==(const NmMailbox &mailbox) const |
112 { |
134 { |
|
135 NM_FUNCTION; |
|
136 |
113 bool ret = true; |
137 bool ret = true; |
114 |
138 |
115 if (this->name().compare(mailbox.name()) != 0) { |
139 if (this->name().compare(mailbox.name()) != 0) { |
116 ret = false; |
140 ret = false; |
117 } |
141 } |
122 } |
146 } |
123 |
147 |
124 |
148 |
125 NmAddress NmMailbox::address() const |
149 NmAddress NmMailbox::address() const |
126 { |
150 { |
|
151 NM_FUNCTION; |
|
152 |
127 return d->mAddress; |
153 return d->mAddress; |
128 } |
154 } |
129 |
155 |
130 |
156 |
131 void NmMailbox::setAddress(const NmAddress& address) |
157 void NmMailbox::setAddress(const NmAddress& address) |
132 { |
158 { |
|
159 NM_FUNCTION; |
|
160 |
133 d->mAddress = address; |
161 d->mAddress = address; |
134 } |
162 } |
135 |
163 |