locationtriggering/ltclientlib/inc/lbtterminalptrholder.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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 "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:  Pointer holder for client's data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __LBTTERMINALPTRHOLDER_H__
       
    20 #define __LBTTERMINALPTRHOLDER_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <lbscommon.h>
       
    24 
       
    25 /*
       
    26  * Holds the TPtr8 and TPtrC8 arrays for all RPositionServer requests.
       
    27  *
       
    28  * internal
       
    29  */
       
    30 class CLbtSubSessnPtrHolder : public CBase
       
    31 	{
       
    32 public:
       
    33     /**
       
    34      * Allocates and constructs a <code>CLbtSubSessnPtrHolder</code> object.
       
    35      *
       
    36      * The function leaves if there is insufficient memory.
       
    37      *
       
    38      * @publishedAll
       
    39      * @param aNumberOfPtrs is the number of modifiable pointer descriptors to
       
    40      * create. These are used for asynchronous 'get' requests.
       
    41      * @param aNumberOfPtrCs is the number of read-only pointer descriptors to
       
    42      * create. These are used for asynchronous 'set' requests.
       
    43      * @return a newly created CLbtSubSessnPtrHolder object.
       
    44      */
       
    45 	IMPORT_C static CLbtSubSessnPtrHolder* NewL(TInt aNumberOfPtrs, 
       
    46 	                                            TInt aNumberOfPtrCs);
       
    47 	
       
    48 	/**
       
    49 	 * Destructor
       
    50 	 */
       
    51  	IMPORT_C ~CLbtSubSessnPtrHolder();
       
    52 	
       
    53 	/**
       
    54      * An accessor for the modifiable pointer descriptors.
       
    55      *
       
    56      * @publishedAll
       
    57      * @param aIndex specifies the descriptor to return.
       
    58      * @return a reference to one of our contained pointer descriptors.
       
    59      */
       
    60 	IMPORT_C TPtr8& Ptr(TInt aIndex);
       
    61 	
       
    62 	/**
       
    63      * An accessor for the read-only pointer descriptors.
       
    64      *
       
    65      * @publishedAll
       
    66      * @param aIndex specifies the descriptor to return.
       
    67      * @return a reference to one of our contained pointer descriptors.
       
    68      */
       
    69 	IMPORT_C TPtrC8& PtrC(TInt aIndex);
       
    70 	
       
    71 protected:
       
    72     /**
       
    73      * Leaving constructor for CLbtSubSessnPtrHolder.
       
    74      *
       
    75      * @publishedAll
       
    76      * @param aNumberOfPtrs is the number of modifiable pointer descriptors to
       
    77      * create. These are used for asynchronous 'get' requests.
       
    78      * @param aNumberOfPtrCs is the number of read-only pointer descriptors to
       
    79      * create. These are used for asynchronous 'set' requests.
       
    80      */
       
    81 	IMPORT_C void ConstructL(TInt aNumberOfPtrs, TInt aNumberOfPtrCs);
       
    82 private:
       
    83     /**
       
    84      * TPtr8 pointer array.
       
    85      */
       
    86 	RArray<TPtr8> iPtrArray;
       
    87 	
       
    88 	/**
       
    89      * TPtrC8 pointer array.
       
    90      */
       
    91 	RArray<TPtrC8> iPtrCArray;
       
    92 	};
       
    93 
       
    94 #endif // __LbtTERMINALPTRHOLDER_H__