|
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 |
|
24 #include "messagingservice.h" |
|
25 #include "sendmessage.h" |
|
26 |
|
27 #ifdef MAIN |
|
28 #define sendmessage_test1 main |
|
29 #endif |
|
30 |
|
31 |
|
32 |
|
33 int sendmessage_test1(int, char**) |
|
34 { |
|
35 __UHEAP_MARK; |
|
36 TInt result = KErrNone; |
|
37 CMessagingService* test = (CMessagingService*) CMessagingService::NewL() ; |
|
38 CleanupStack::PushL( test ); |
|
39 CSendMessageParams* messageParam = CSendMessageParams::NewL(); |
|
40 CleanupStack::PushL(messageParam); |
|
41 messageParam->AddRecipientL(_L("9008032761")); |
|
42 messageParam->AddRecipientL(_L("9008032762")); |
|
43 messageParam->SetMessageTypeL(_L("SMS")); |
|
44 messageParam->SetBodyTextL(_L("Hi How are you!!! Its the first sms from imessaging")); |
|
45 |
|
46 TRAP(result, test->SendMessageL(messageParam, NULL)); |
|
47 |
|
48 CleanupStack::PopAndDestroy(2, test) ; |
|
49 |
|
50 __UHEAP_MARKEND; |
|
51 |
|
52 return result; |
|
53 } |