|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "SENDAS2MTM.H" |
|
17 #include <mtmdef.h> |
|
18 |
|
19 |
|
20 TInt CSendMtm::QueryCapability(TUid aCapability, TInt& aResponse) |
|
21 { |
|
22 TInt ret=KErrNone; |
|
23 switch (aCapability.iUid) |
|
24 { |
|
25 // supported |
|
26 case KUidMtmQuerySendAsMessageSendSupportValue: |
|
27 case KUidMtmQueryCanSendMsgValue: |
|
28 case KUidMtmQueryOffLineAllowedValue: |
|
29 break; |
|
30 // supported with responses |
|
31 case KUidMtmQueryMaxBodySizeValue: |
|
32 aResponse = 0x10000; |
|
33 break; |
|
34 case KUidMtmQuerySupportedBodyValue: |
|
35 aResponse = KMtm7BitBody|KMtm8BitBody; |
|
36 break; |
|
37 case KUidMtmQueryMaxTotalMsgSizeValue: |
|
38 aResponse = 0x40000; |
|
39 break; |
|
40 // not supported |
|
41 case KUidMtmQuerySupportsRecipientTypeValue: |
|
42 case KUidMtmQueryCanReceiveMsgValue: |
|
43 case KUidMtmQuerySupportAttachmentsValue: |
|
44 default: |
|
45 ret=KErrNotSupported; |
|
46 break; |
|
47 } |
|
48 return ret; |
|
49 } |
|
50 |
|
51 TUint CSendMtm::ValidateMessage(TMsvPartList /*aPartList*/) |
|
52 { |
|
53 return KMsvMessagePartBody; |
|
54 } |
|
55 |
|
56 |
|
57 void CSendMtm::SetSubjectL(const TDesC& /*aSubject*/) |
|
58 { |
|
59 User::Leave(KErrCancel); |
|
60 } |
|
61 |
|
62 void CSendMtm::AddAddresseeL(TMsvRecipientType /*aType*/, const TDesC& /*aRealAddress*/) |
|
63 { |
|
64 User::Leave(KErrNotSupported); |
|
65 } |
|
66 |
|
67 void CSendMtm::AddAddresseeL(TMsvRecipientType /*aType*/, const TDesC& /*aRealAddress*/, const TDesC& /*aAlias*/) |
|
68 { |
|
69 User::Leave(KErrNotSupported); |
|
70 } |
|
71 |