serviceproviders/sapi_sensor/src/storeasyncinfo.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 17 Dec 2009 09:09:50 +0200
changeset 26 5d0ec8b709be
parent 5 989d2f495d90
permissions -rw-r--r--
Revision: 200949 Kit: 200951
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     1
/*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     8
*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    11
*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    12
* Contributors:
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    13
*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    14
* Description:  ?Description
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    15
*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    16
*/
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    17
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    18
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    19
#include "storeasyncinfo.h"
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    20
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    21
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    22
/*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    23
-----------------------------------------------------------------------------
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    24
    CStoreAsyncInfo::CStoreAsyncInfo()
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    25
    Description    : Constructor
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    26
    Return values  : N/A
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    27
-----------------------------------------------------------------------------
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    28
*/
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    29
CStoreAsyncInfo :: CStoreAsyncInfo( TAsyncType atype,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    30
                                    TInt32 aTransactionId,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    31
                                    CSensorCallback* aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    32
                                    TUint aChannelId )
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    33
                 :ichnlId( aChannelId ),
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    34
                  iTransactionId( aTransactionId ),
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    35
                  iAsyncType( atype ),
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    36
                  iCallback( aCallback )
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    37
    {
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    38
    }
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    39
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    40
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    41
/*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    42
-----------------------------------------------------------------------------
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    43
    void CStoreAsyncInfo::ConstructL()
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    44
    Description         : Symbian 2nd phase constructor can leave.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    45
    Return values       : N/A
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    46
-----------------------------------------------------------------------------
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    47
*/
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    48
void CStoreAsyncInfo :: ConstructL()
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    49
    {
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    50
    }
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    51
    
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    52
/*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    53
-----------------------------------------------------------------------------
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    54
    CStoreAsyncInfo* CStoreAsyncInfo::NewL()
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    55
    Description                       : Two-phased constructor.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    56
    Return values                     : CSensorInterface object pointer
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    57
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    58
-----------------------------------------------------------------------------
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    59
*/
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    60
CStoreAsyncInfo* CStoreAsyncInfo::NewL( TAsyncType aType,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    61
                                        TInt32 aTransactionId,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    62
                                        CSensorCallback* aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    63
                                        TUint aChnlId )
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    64
    {
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    65
    CStoreAsyncInfo* self = new ( ELeave ) CStoreAsyncInfo( aType,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    66
    														aTransactionId,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    67
    														aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    68
    														aChnlId );
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    69
    CleanupStack::PushL( self );
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    70
    self->ConstructL();
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    71
    CleanupStack::Pop( self );
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    72
    return self;
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    73
    }
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    74
    
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    75
/*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    76
-----------------------------------------------------------------------------
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    77
    CStoreAsyncInfo::~CStoreAsyncInfo()
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    78
    Description     : Destructor, free allocated resources
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    79
    Return values   : N/A
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    80
-----------------------------------------------------------------------------
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    81
*/
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    82
CStoreAsyncInfo::~CStoreAsyncInfo()
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    83
    {
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    84
    }
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    85