baseport/src/cedar/generic/base/syborg/svpsnapdriver/src/snapapp.cpp
changeset 2 d55eb581a87c
parent 1 2fb8b9db1c86
child 3 c2946f91d81f
equal deleted inserted replaced
1:2fb8b9db1c86 2:d55eb581a87c
     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 #include <e32base.h>   // CTrapCleanup
       
    19 
       
    20 #include "rsvpsnapdriver.h"
       
    21 
       
    22 #define SVPDBG
       
    23 #ifdef SVPDBG
       
    24 #include <e32debug.h>
       
    25 #define DP(format...) RDebug::Printf(format)
       
    26 #else
       
    27 #define DP(format...)
       
    28 #endif
       
    29 
       
    30 _LIT8(KTestSendData,"kalle");
       
    31 
       
    32 GLDEF_C TInt E32Main()
       
    33 {
       
    34   DP("** (SNAPAPP) E32Main()");
       
    35 
       
    36   //  CTrapCleanup* cleanup;
       
    37   //  cleanup=CTrapCleanup::New();
       
    38   //  __UHEAP_MARK;
       
    39 
       
    40 #if 0
       
    41   TInt err = User::LoadLogicalDevice(KSVPSnapDriverLDD);
       
    42   if (err==KErrAlreadyExists)
       
    43 	DP("KErrAlreadyExists");
       
    44 #endif
       
    45   
       
    46   RSVPSnapDriver drv;
       
    47   TInt err = drv.Open();
       
    48   
       
    49 #if 1
       
    50   if (err==KErrNone)
       
    51 	  {
       
    52 	  
       
    53 	drv.SaveVM(KTestSendData);
       
    54 	  }
       
    55   else
       
    56 	DP("Error");
       
    57 #else
       
    58   drv.LoadVM(KTestSendData);   // Will never return
       
    59 #endif
       
    60   
       
    61   //  __UHEAP_MARKEND;
       
    62   //  delete cleanup;
       
    63   return(KErrNone);
       
    64 }