baseport/syborg/svpsnapdriver/src/rsvpsnapdriver.cpp
author MattD <mattd@symbian.org>
Tue, 23 Mar 2010 21:04:26 +0000
changeset 53 b8b0521c95b2
parent 2 d55eb581a87c
permissions -rw-r--r--
rombuilding fixes - stop exporting base.iby, and set the other bits to work with the kernel base.iby
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     1
/*
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     3
* All rights reserved.
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     8
*
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
     9
* Initial Contributors:
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    11
*
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    12
* Contributors:
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    13
*
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    14
* Description:
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    15
*
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    16
*/
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    17
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    18
#include <e32std.h>    // for User::
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    19
#include "rsvpsnapdriver.h"
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    20
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    21
//#define SVPDBG
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    22
#ifdef SVPDBG
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    23
#include <e32debug.h>
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    24
#define DP(format...) RDebug::Printf(format)
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    25
#else
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    26
#define DP(format...)
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    27
#endif
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    28
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    29
TInt RSVPSnapDriver::Open(void)
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    30
{
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    31
  DP("** RSVPSnapDriver::Open()");
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    32
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    33
  const TVersion ver = TVersion(KMajorVersionNumber,KMinorVersionNumber,KBuildVersionNumber);
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    34
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    35
  return DoCreate(KSVPSnapDriverName,
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    36
				  ver,
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    37
				  KNullUnit,
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    38
				  NULL,
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    39
				  NULL);
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    40
}
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    41
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    42
TInt RSVPSnapDriver::SaveVM(const TDesC8& aData)
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    43
{
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    44
  DP("** RSVPSnapDriver::SaveVM");
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    45
  
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    46
  //DP("** RSVPSnapDriver::SaveVM: - length of data=%d", length);
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    47
  //DP("** RSVPSnapDriver::SaveVM: - aName= %s", name.Ptr());
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    48
	
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    49
  return DoSVPRequest(ESaveVM,(TAny*)&aData);
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    50
 }
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    51
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    52
TInt RSVPSnapDriver::LoadVM(const TDesC8& aData)
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    53
{
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    54
  DP("** RSVPSnapDriver::LoadVM");
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    55
  return DoSVPRequest(ELoadVM,(TAny*)&aData);
ffa851df0825 Initial syborg (baseport) and documentation import
martin.trojer@nokia.com
parents:
diff changeset
    56
}