1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef NMAPIEMAILSERVICE_H |
|
19 #define NMAPIEMAILSERVICE_H |
|
20 |
|
21 #include <nmapidef.h> |
|
22 #include <QObject> |
|
23 |
|
24 class NmApiEngine; |
|
25 |
|
26 /*! |
|
27 Client that wants to access mailboxes, messages and receive related events |
|
28 use this class as "entry point". |
|
29 */ |
|
30 |
|
31 namespace EmailClientApi |
|
32 { |
|
33 |
|
34 class NmApiMessageEnvelope; |
|
35 class NmApiMailbox; |
|
36 class NmApiMessage; |
|
37 |
|
38 class NMAPI_EXPORT NmApiEmailService : public QObject |
|
39 { |
|
40 Q_OBJECT |
|
41 public: |
|
42 |
|
43 /*! |
|
44 constructor for NmApiEmailService |
|
45 */ |
|
46 NmApiEmailService(QObject* parent); |
|
47 |
|
48 /*! |
|
49 destructor for NmApiEmailService |
|
50 */ |
|
51 virtual ~NmApiEmailService(); |
|
52 |
|
53 /*! |
|
54 Initialises email service. this must be called and initialised signal received |
|
55 before services of the library are used. |
|
56 */ |
|
57 void initialise(); |
|
58 |
|
59 /*! |
|
60 frees resources. |
|
61 */ |
|
62 void uninitialise(); |
|
63 |
|
64 /*! |
|
65 gets mail message envelope by id (see also NmApiEventNotifier) |
|
66 */ |
|
67 bool getEnvelope(const quint64 mailboxId, |
|
68 const quint64 folderId, |
|
69 const quint64 envelopeId, |
|
70 EmailClientApi::NmApiMessageEnvelope &envelope); |
|
71 |
|
72 /*! |
|
73 gets mailbox info by id (see also NmApiEventNotifier) |
|
74 */ |
|
75 bool getMailbox(const quint64 mailboxId, EmailClientApi::NmApiMailbox &mailboxInfo); |
|
76 |
|
77 /*! |
|
78 gets mail message by id (see also NmApiEventNotifier) |
|
79 */ |
|
80 bool getMessage(const quint64 mailboxId, |
|
81 const quint64 folderId, |
|
82 const quint64 messageId, |
|
83 EmailClientApi::NmApiMessage &message); |
|
84 |
|
85 |
|
86 |
|
87 /*! |
|
88 returns isrunning flag value |
|
89 */ |
|
90 bool isRunning() const; |
|
91 signals: |
|
92 /*! |
|
93 this signal is emitted when initialisation is completed |
|
94 boolean argument tells if initialisation succeeded |
|
95 */ |
|
96 void initialized(bool); |
|
97 |
|
98 private: |
|
99 NmApiEngine *mEngine; |
|
100 bool mIsRunning; |
|
101 }; |
|
102 } |
|
103 #endif /* NMAPIEMAILSERVICE_H */ |
|