author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 19 | 989d2f495d90 |
permissions | -rw-r--r-- |
19 | 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 the License "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 |
||
19 |
// STLport regression testsuite component. |
|
20 |
// To compile as a separate example, please #define MAIN. |
|
21 |
||
22 |
#include<e32base.h> |
|
23 |
#include <msvapi.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
24 |
#include <cmsvattachment.h> |
19 | 25 |
|
26 |
#include "messagingservice.h" |
|
27 |
||
28 |
#include "sendmessage.h" |
|
29 |
||
30 |
#ifdef MAIN |
|
31 |
#define sendmessage_test4 main |
|
32 |
#endif |
|
33 |
||
34 |
||
35 |
||
36 |
int sendmessage_test4(int, char**) |
|
37 |
{ |
|
38 |
__UHEAP_MARK; |
|
39 |
TInt result = KErrNone; |
|
40 |
CMessagingService* test = (CMessagingService* ) CMessagingService::NewL() ; |
|
41 |
CleanupStack::PushL(test); |
|
42 |
CSendMessageParams* messageParam = CSendMessageParams::NewL(); |
|
43 |
CleanupStack::PushL(messageParam); |
|
44 |
messageParam->AddRecipientL(_L("9008032761")); |
|
45 |
||
46 |
messageParam->SetMessageTypeL(_L("MMS")); |
|
47 |
||
48 |
messageParam->SetBodyTextL(_L("Hi How are you!!! Its the first mms from imessaging")); |
|
49 |
messageParam->SetSubjectL(_L("MMS")); |
|
50 |
||
51 |
CMsvAttachment* element = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); |
|
52 |
element->SetMimeTypeL(_L8("image/jpeg")); |
|
53 |
element->SetAttachmentNameL(_L("c:\\data\\images\\test1.jpg")); |
|
54 |
messageParam->AddAttachmentL(element); |
|
55 |
||
56 |
element = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); |
|
57 |
element->SetMimeTypeL(_L8("image/jpeg")); |
|
58 |
element->SetAttachmentNameL(_L("c:\\data\\images\\test2.jpg")); |
|
59 |
messageParam->AddAttachmentL(element); |
|
60 |
||
61 |
TRAP(result, test->SendMessageL(messageParam, NULL)); |
|
62 |
||
63 |
CleanupStack::PopAndDestroy(2, test); |
|
64 |
||
65 |
__UHEAP_MARKEND; |
|
66 |
||
67 |
return result; |
|
68 |
} |