|
1 /* |
|
2 * Copyright (c) 2010 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: Email address in Email Client API |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MEMAILADDRESS_H |
|
19 #define MEMAILADDRESS_H |
|
20 |
|
21 #include <emailapidefs.h> |
|
22 |
|
23 namespace EmailInterface { |
|
24 |
|
25 /** |
|
26 * Email address that is used as recipient or sender in MEmailMessage and |
|
27 * mailbox address in MEmailMailbox. |
|
28 * @since S60 v5.0 |
|
29 */ |
|
30 class MEmailAddress : public MEmailInterface |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Association role of the address in message/mailbox. |
|
35 */ |
|
36 enum TRole { |
|
37 // role is undefined |
|
38 EUndefined, |
|
39 // reply-to address in a message |
|
40 EReplyTo, |
|
41 // sender of a message |
|
42 ESender, |
|
43 // to-recipient of a message |
|
44 ETo, |
|
45 // cc-recipient of a message |
|
46 ECc, |
|
47 // bcc-recipient of a message |
|
48 EBcc }; |
|
49 |
|
50 /** |
|
51 * Sets email address |
|
52 * @param email address |
|
53 */ |
|
54 virtual void SetAddressL( const TDesC& aAddress ) = 0; |
|
55 |
|
56 /** |
|
57 * Returns email address |
|
58 * @return email address |
|
59 */ |
|
60 virtual TPtrC Address() const = 0; |
|
61 |
|
62 /** |
|
63 * Sets display name for the address |
|
64 * @param display name |
|
65 */ |
|
66 virtual void SetDisplayNameL( const TDesC& aDisplayName ) = 0; |
|
67 |
|
68 /** |
|
69 * Returns display name for the address |
|
70 * @return display name |
|
71 */ |
|
72 virtual TPtrC DisplayName() const = 0; |
|
73 |
|
74 /** |
|
75 * Returns role associated with the address |
|
76 * @return role |
|
77 */ |
|
78 virtual TRole Role() const = 0; |
|
79 |
|
80 /** |
|
81 * Sets role |
|
82 * @param role |
|
83 */ |
|
84 virtual void SetRole( const TRole aRole ) = 0; |
|
85 }; |
|
86 |
|
87 typedef RPointerArray<MEmailAddress> REmailAddressArray; |
|
88 |
|
89 } // namespace EmailInterface { |
|
90 |
|
91 #endif // MEMAILADDRESS_H |