diff -r a36b1e19a461 -r 989d2f495d90 serviceproviders/sapi_messaging/tsrc/dev/tmessagingtest/tmsg_sendmessageiter1/src/sendmessage1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/serviceproviders/sapi_messaging/tsrc/dev/tmessagingtest/tmsg_sendmessageiter1/src/sendmessage1.cpp Fri Jul 03 15:51:24 2009 +0100 @@ -0,0 +1,53 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +// STLport regression testsuite component. +// To compile as a separate example, please #define MAIN. + +#include + +#include "messagingservice.h" +#include "sendmessage.h" + +#ifdef MAIN +#define sendmessage_test1 main +#endif + + + +int sendmessage_test1(int, char**) + { + __UHEAP_MARK; + TInt result = KErrNone; + CMessagingService* test = (CMessagingService*) CMessagingService::NewL() ; + CleanupStack::PushL( test ); + CSendMessageParams* messageParam = CSendMessageParams::NewL(); + CleanupStack::PushL(messageParam); + messageParam->AddRecipientL(_L("9008032761")); + messageParam->AddRecipientL(_L("9008032762")); + messageParam->SetMessageTypeL(_L("SMS")); + messageParam->SetBodyTextL(_L("Hi How are you!!! Its the first sms from imessaging")); + + TRAP(result, test->SendMessageL(messageParam, NULL)); + + CleanupStack::PopAndDestroy(2, test) ; + + __UHEAP_MARKEND; + + return result; + }