serviceproviders/sapi_messaging/tsrc/dev/tmessagingprovidertest/manual/tmsg_notificationiter3/src/messagenotificationtestblocks.cpp
changeset 19 989d2f495d90
child 33 50974a8b132e
equal deleted inserted replaced
14:a36b1e19a461 19:989d2f495d90
       
     1 /*
       
     2 * Copyright (c) 2002 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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <e32svr.h>
       
    23 #include <StifParser.h>
       
    24 #include <Stiftestinterface.h>
       
    25 #include <msvids.h> 
       
    26 ////#include <senduiconsts.h>
       
    27 #include <LiwCommon.h>
       
    28 #include "messaginginterface.h"
       
    29 
       
    30 #include "notify.h"
       
    31 
       
    32 #include "messagenotificationtest.h"
       
    33 
       
    34 
       
    35 
       
    36 
       
    37 // ============================= LOCAL FUNCTIONS ===============================
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // ?function_name ?description.
       
    41 // ?description
       
    42 // Returns: ?value_1: ?description
       
    43 //          ?value_n: ?description_line1
       
    44 //                    ?description_line2
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 /*
       
    48 ?type ?function_name(
       
    49     ?arg_type arg,  // ?description
       
    50     ?arg_type arg)  // ?description
       
    51     {
       
    52 
       
    53     ?code  // ?comment
       
    54 
       
    55     // ?comment
       
    56     ?code
       
    57     }
       
    58 */
       
    59 
       
    60 // ============================ MEMBER FUNCTIONS ===============================
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // CTLocTest::Delete
       
    64 // Delete here all resources allocated and opened from test methods. 
       
    65 // Called from destructor. 
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 void CTMessageNotificationTest::Delete() 
       
    69     {
       
    70 
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // CTLocTest::RunMethodL
       
    75 // Run specified method. Contains also table of test mothods and their names.
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 TInt CTMessageNotificationTest::RunMethodL( 
       
    79     CStifItemParser& aItem ) 
       
    80     {
       
    81 
       
    82     static TStifFunctionInfo const KFunctions[] =
       
    83         {  
       
    84         // Copy this line for every implemented function.
       
    85         // First string is the function name used in TestScripter script file.
       
    86         // Second is the actual implementation member function. 
       
    87         //TRY( "SendMessage",    CTMessageNotificationTest::SendMessage ),
       
    88         
       
    89         ENTRY( "MessageNotificationSms",    CTMessageNotificationTest::MessageNotificationSms),
       
    90         
       
    91         };
       
    92 
       
    93     const TInt count = sizeof( KFunctions ) / 
       
    94                         sizeof( TStifFunctionInfo );
       
    95 
       
    96     return RunInternalL( KFunctions, count, aItem );
       
    97 
       
    98     }
       
    99 
       
   100 
       
   101 
       
   102 
       
   103      
       
   104      TInt  CTMessageNotificationTest::MessageNotificationSms(CStifItemParser& /*aItem*/)
       
   105 	{
       
   106 
       
   107 
       
   108 	int ret=0;
       
   109     ret = ReqNotification(0, NULL);
       
   110     
       
   111     if(ret==0)
       
   112 			return KErrNone;
       
   113 	else	
       
   114 			return KErrGeneral;
       
   115 
       
   116    
       
   117 	}