13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "nmapimailbox.h" |
18 #include <nmapimailbox.h> |
|
19 #include "nmapimailbox_p.h" |
|
20 |
|
21 #include <QString> |
19 |
22 |
20 namespace EmailClientApi |
23 namespace EmailClientApi |
21 { |
24 { |
22 NmMailboxPrivate::NmMailboxPrivate() |
25 |
|
26 /*! |
|
27 constructor for NmApiMailbox |
|
28 */ |
|
29 NmApiMailbox::NmApiMailbox() |
23 { |
30 { |
24 |
31 d = new NmApiMailboxPrivate(); |
25 } |
32 } |
26 |
33 |
27 NmMailboxPrivate::~NmMailboxPrivate() |
34 /*! |
|
35 Copy constructor for NmApiMailbox |
|
36 */ |
|
37 NmApiMailbox::NmApiMailbox(const NmApiMailbox &nmApiMailbox) |
|
38 : d(nmApiMailbox.d) |
28 { |
39 { |
29 |
40 |
30 } |
41 } |
31 |
42 |
32 /* |
43 /*! |
33 * constructor for nmmailbox |
44 destructor for NmApiMailbox |
34 */ |
45 */ |
35 NmMailbox::NmMailbox() |
46 NmApiMailbox::~NmApiMailbox() |
36 { |
|
37 d = new NmMailboxPrivate(); |
|
38 } |
|
39 |
|
40 /* |
|
41 * destructor for nmmailbox |
|
42 */ |
|
43 NmMailbox::~NmMailbox() |
|
44 { |
47 { |
45 |
48 |
46 } |
49 } |
47 |
50 |
48 /*! |
51 /*! |
49 Assign data from \a mailbox |
52 Assign data from \a mailbox |
50 */ |
53 */ |
51 NmMailbox &NmMailbox::operator=(const NmMailbox &mailbox) |
54 NmApiMailbox &NmApiMailbox::operator=(const NmApiMailbox &mailbox) |
52 { |
55 { |
53 if (this != &mailbox) { |
56 if (this != &mailbox) { |
54 d = mailbox.d; |
57 d = mailbox.d; |
55 } |
58 } |
56 return *this; |
59 return *this; |
57 } |
60 } |
58 |
61 |
59 /* |
62 /*! |
60 * getter for id |
63 Compare data from \a mailbox |
61 */ |
64 */ |
62 quint64 NmMailbox::id() const |
65 bool NmApiMailbox::operator==(const NmApiMailbox &mailbox) |
|
66 { |
|
67 bool returnValue = false; |
|
68 if (d == mailbox.d) { |
|
69 returnValue = true; |
|
70 } |
|
71 return returnValue; |
|
72 } |
|
73 |
|
74 /*! |
|
75 getter for id |
|
76 */ |
|
77 quint64 NmApiMailbox::id() const |
63 { |
78 { |
64 return d->id; |
79 return d->id; |
65 } |
80 } |
66 |
81 |
67 /* |
82 /*! |
68 * getter for address |
83 getter for address |
69 */ |
84 */ |
70 QString NmMailbox::address() const |
85 QString NmApiMailbox::address() const |
71 { |
86 { |
72 return d->address; |
87 return d->address; |
73 } |
88 } |
74 |
89 |
75 /* |
90 /*! |
76 * getter for name |
91 getter for name |
77 */ |
92 */ |
78 QString NmMailbox::name() const |
93 QString NmApiMailbox::name() const |
79 { |
94 { |
80 return d->name; |
95 return d->name; |
81 } |
96 } |
82 |
97 |
83 /* |
98 /*! |
84 * setter for id |
99 setter for id |
85 */ |
100 */ |
86 void NmMailbox::setId(quint64 id) |
101 void NmApiMailbox::setId(quint64 id) |
87 { |
102 { |
88 d->id = id; |
103 d->id = id; |
89 } |
104 } |
90 |
105 |
91 /* |
106 /*! |
92 * setter for address |
107 setter for address |
93 */ |
108 */ |
94 void NmMailbox::setAddress(const QString &address) |
109 void NmApiMailbox::setAddress(const QString &address) |
95 { |
110 { |
96 d->address = address; |
111 d->address = address; |
97 } |
112 } |
98 |
113 |
99 /* |
114 /*! |
100 * setter for name |
115 setter for name |
101 */ |
116 */ |
102 void NmMailbox::setName(const QString &name) |
117 void NmApiMailbox::setName(const QString &name) |
103 { |
118 { |
104 d->name = name; |
119 d->name = name; |
105 } |
120 } |
106 |
121 |
107 } |
122 } |