CPS Kernel/CpsKernelIf.h
author Arnaud Lenoir
Tue, 27 Jul 2010 14:02:05 +0100
changeset 17 fc9a6286e87d
parent 0 bb4b476bbb96
permissions -rw-r--r--
FYI - READ ONLY - contact arnaudl@symbian.org for any changes you want. Added data code availabe for OS&Base Services.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     1
/*
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     2
  CpsKernelIf.h
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     3
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     4
  Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     5
  All rights reserved.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     6
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     7
  This program and the accompanying materials are made available 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     8
  under the terms of the Eclipse Public License v1.0 which accompanies 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     9
  this distribution, and is available at 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    10
  http://www.eclipse.org/legal/epl-v10.html
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    11
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    12
  Initial Contributors:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    13
  Nokia Corporation - initial contribution.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    14
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    15
  Contributors:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    16
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    17
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    18
#ifndef __CPSKERNELIF_H__
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    19
#define __CPSKERNELIF_H__
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    20
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    21
//  - Includes ------------------------
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    22
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    23
//  - Namespace -----------------------
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    24
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    25
//  - Macros --------------------------
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    26
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    27
//  - Constants -----------------------
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    28
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    29
//  - External data -------------------
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    30
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    31
//  - Forward declarations ------------
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    32
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    33
class DCpsLddFactory;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    34
class TCpsCallback;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    35
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    36
//  - Data types ----------------------
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    37
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    38
//  - Class declarations --------------
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    39
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    40
/**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    41
 * CPS interface for kernel side clients
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    42
 */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    43
class DCpsKernelIf : public DBase
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    44
    {
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    45
public:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    46
    /** 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    47
     * Returns data stored into record (synchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    48
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    49
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    50
     * @param  aIndex      The index ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    51
     * @param  aLength     The size of data to be read from the beginning of record.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    52
     * @param  aDataBuffer The pointer to data buffer that contains read data.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    53
     * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    54
     * @return KErrNone or standard error code
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    55
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    56
    IMPORT_C static TInt ReadRecord( TUint16 aGroup, TUint16 aIndex, TUint32 aLength, TDes8& aDataBuffer );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    57
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    58
    /** 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    59
     * Returns data stored into record (asynchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    60
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    61
     * @param  aCb         The pointer to a CPS callback object.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    62
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    63
     * @param  aIndex      The index ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    64
     * @param  aLength     The size of data to be read from the beginning of record.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    65
     * @param  aDataBuffer The pointer to data buffer that contains read data.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    66
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    67
    IMPORT_C static void ReadRecord( TCpsCallback* aCb, TUint16 aGroup, TUint16 aIndex, TUint32 aLength, TDes8& aDataBuffer );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    68
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    69
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    70
     * Used to store data into record (synchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    71
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    72
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    73
     * @param  aIndex      The index ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    74
     * @param  aLength     The size of data to be written into record.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    75
     * @param  aDataBuffer The pointer to data buffer that contains data.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    76
     * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    77
     * @return KErrNone or standard error code
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    78
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    79
    IMPORT_C static TInt WriteRecord( TUint16 aGroup, TUint16 aIndex, TUint32 aLength, const TDesC8& aDataBuffer );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    80
        
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    81
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    82
     * Used to store data into record (asynchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    83
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    84
     * @param  aCb         The pointer to a CPS callback object.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    85
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    86
     * @param  aIndex      The index ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    87
     * @param  aLength     The size of data to be written into record.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    88
     * @param  aDataBuffer The pointer to data buffer that contains data.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    89
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    90
    IMPORT_C static void WriteRecord( TCpsCallback* aCb, TUint16 aGroup, TUint16 aIndex, TUint32 aLength, const TDesC8& aDataBuffer );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    91
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    92
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    93
     * Used to remove existing record (synchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    94
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    95
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    96
     * @param  aIndex      The index ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    97
     * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    98
     * @return KErrNone or standard error code   
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    99
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   100
    IMPORT_C static TInt RemoveRecord( TUint16 aGroup, TUint16 aIndex );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   101
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   102
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   103
     * Used to remove existing record (asynchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   104
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   105
     * @param  aCb         The pointer to a CPS callback object.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   106
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   107
     * @param  aIndex      The index ID which is accessed.   
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   108
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   109
    IMPORT_C static void RemoveRecord( TCpsCallback* aCb, TUint16 aGroup, TUint16 aIndex );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   110
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   111
    /**    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   112
     * Used to remove all existing records from given group (synchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   113
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   114
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   115
     * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   116
     * @return KErrNone or standard error code
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   117
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   118
    IMPORT_C static TInt RemoveAllRecords( TUint16 aGroup );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   119
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   120
    /**    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   121
     * Used to remove all existing records from given group (asynchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   122
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   123
     * @param  aCb         The pointer to a CPS callback object.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   124
     * @param  aGroup      The group ID which is accessed.  
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   125
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   126
    IMPORT_C static void RemoveAllRecords( TCpsCallback* aCb, TUint16 aGroup );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   127
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   128
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   129
     * Used to query size of existing record (synchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   130
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   131
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   132
     * @param  aIndex      The index ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   133
     * @param  aSize       CPS stores record size to this parameter.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   134
     * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   135
     * @return KErrNone or standard error code     
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   136
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   137
    IMPORT_C static TInt RecordSizeGet( TUint16 aGroup, TUint16 aIndex, TUint32& aSize );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   138
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   139
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   140
     * Used to query amount of memory used by given group (synchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   141
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   142
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   143
     * @param  aSize       CPS stores amount of used memory by aGroup to this parameter.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   144
     * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   145
     * @return KErrNone or standard error code   
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   146
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   147
    IMPORT_C static TInt GroupSizeGet( TUint16 aGroup, TUint32& aSize );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   148
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   149
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   150
     * Used to amount of available memory for given group (synchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   151
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   152
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   153
     * @param  aSize       CPS stores amount of available memory to this parameter.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   154
     * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   155
     * @return KErrNone or standard error code     
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   156
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   157
    IMPORT_C static TInt AvailableSizeGet( TUint16 aGroup, TUint32& aSize );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   158
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   159
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   160
      * Cancels ongoing client request. 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   161
      * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   162
      * @note Client's callback is called with KErrCancel status if request is removed successfully from the operation queue
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   163
      * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   164
      * @param  aCb         The pointer to a CPS callback object.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   165
      */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   166
    IMPORT_C static void CancelRequest( TCpsCallback* aCb );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   167
        
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   168
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   169
     * CPS factory calls this to create kernel IF
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   170
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   171
     * @note For CPS internal use only
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   172
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   173
     * @param aFactoryObj   Factory object
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   174
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   175
    static void CreateKernelInstance( DCpsLddFactory* aFactoryObj );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   176
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   177
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   178
     * CPS factory calls this to delete kernel IF
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   179
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   180
     * @note For CPS internal use only
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   181
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   182
    static void DeleteKernelInstance();
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   183
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   184
private:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   185
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   186
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   187
     * Used to query size of existing record (asynchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   188
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   189
     * @param  aCb         The pointer to a CPS callback object.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   190
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   191
     * @param  aIndex      The index ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   192
     * @param  aSize       CPS stores record size to this parameter.     
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   193
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   194
    static void RecordSizeGet( TCpsCallback* aCb, TUint16 aGroup, TUint16 aIndex, TUint32& aSize );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   195
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   196
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   197
     * Used to query amount of memory used by given group (asynchronous).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   198
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   199
     * @param  aCb         The pointer to a CPS callback object.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   200
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   201
     * @param  aSize       CPS stores amount of used memory by aGroup to this parameter.   
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   202
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   203
    static void GroupSizeGet( TCpsCallback* aCb, TUint16 aGroup, TUint32& aSize );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   204
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   205
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   206
     * Used to amount of available memory for given group.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   207
     *
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   208
     * @param  aCb         The pointer to a CPS callback object.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   209
     * @param  aGroup      The group ID which is accessed.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   210
     * @param  aSize       CPS stores amount of available memory to this parameter.     
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   211
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   212
    static void AvailableSizeGet( TCpsCallback* aCb, TUint16 aGroup, TUint32& aSize );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   213
        
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   214
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   215
     * Callback function for synchronous CPS kernel operation.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   216
     * 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   217
     * @ param aStatus KErrNone or standard error code
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   218
     * @ aArg Argument for callback
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   219
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   220
    static void SyncOperationReady( TInt aStatus, TAny* aArg );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   221
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   222
private:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   223
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   224
     * Constructor
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   225
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   226
    DCpsKernelIf();
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   227
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   228
    /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   229
     * Destructor
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   230
     */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   231
    ~DCpsKernelIf();
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   232
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   233
private:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   234
    /** Kernel IF object */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   235
    static DCpsKernelIf* iKernelIf;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   236
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   237
    /** Factory object */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   238
    static DCpsLddFactory* iFactory;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   239
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   240
    /** Callback for synchronous operations */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   241
    TCpsCallback* iSyncCb;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   242
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   243
    /** Semaphore for locking the synchronous interface */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   244
    DSemaphore *iSyncLock;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   245
    
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   246
    /** Synchronous operation result */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   247
    TInt iSyncOpResult;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   248
    };
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   249
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   250
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   251
/**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   252
 * CPS asynchronous callback function 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   253
 */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   254
typedef void (*TCpsCbFn)( TInt aResult, TAny* aParam );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   255
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   256
/**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   257
 * CPS asynchronous callback DFC
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   258
 * The client must create one of these to be passed to each asynchronous call to kernel interface
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   259
 * The callback function is called in the context supplied by the client when creating an object of this kind (aQue)
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   260
 * The callback function takes as arguments the pin id and the state, so it can be common to all TGpioCallback
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   261
 */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   262
class TCpsCallback : public TDfc
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   263
    {
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   264
public:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   265
    inline TCpsCallback( TCpsCbFn aFn, TAny* aPtr, TDfcQue* aQue, TInt aPriority )
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   266
        : TDfc( DfcFunc, this, aQue, aPriority ), iParam( aPtr ), iCallback( aFn ) 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   267
            {}
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   268
private:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   269
    inline static void DfcFunc( TAny* aPtr )
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   270
        {
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   271
        TCpsCallback* pCb = (TCpsCallback*)aPtr;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   272
        //Warning -- Possible use of null pointer
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   273
        //lint -e613
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   274
        pCb->iCallback( pCb->iResult, pCb->iParam );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   275
        }
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   276
public:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   277
    TInt iResult;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   278
    TAny* iParam;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   279
    TCpsCbFn iCallback;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   280
    };
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   281
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   282
#endif /* __CPSKERNELIF_H__ */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   283