diff -r 000000000000 -r 667063e416a2 locationtriggering/ltclientlib/inc/lbtterminalptrholder.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationtriggering/ltclientlib/inc/lbtterminalptrholder.h Tue Feb 02 01:06:48 2010 +0200 @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Pointer holder for client's data +* +*/ + + +#ifndef __LBTTERMINALPTRHOLDER_H__ +#define __LBTTERMINALPTRHOLDER_H__ + +#include +#include + +/* + * Holds the TPtr8 and TPtrC8 arrays for all RPositionServer requests. + * + * internal + */ +class CLbtSubSessnPtrHolder : public CBase + { +public: + /** + * Allocates and constructs a CLbtSubSessnPtrHolder object. + * + * The function leaves if there is insufficient memory. + * + * @publishedAll + * @param aNumberOfPtrs is the number of modifiable pointer descriptors to + * create. These are used for asynchronous 'get' requests. + * @param aNumberOfPtrCs is the number of read-only pointer descriptors to + * create. These are used for asynchronous 'set' requests. + * @return a newly created CLbtSubSessnPtrHolder object. + */ + IMPORT_C static CLbtSubSessnPtrHolder* NewL(TInt aNumberOfPtrs, + TInt aNumberOfPtrCs); + + /** + * Destructor + */ + IMPORT_C ~CLbtSubSessnPtrHolder(); + + /** + * An accessor for the modifiable pointer descriptors. + * + * @publishedAll + * @param aIndex specifies the descriptor to return. + * @return a reference to one of our contained pointer descriptors. + */ + IMPORT_C TPtr8& Ptr(TInt aIndex); + + /** + * An accessor for the read-only pointer descriptors. + * + * @publishedAll + * @param aIndex specifies the descriptor to return. + * @return a reference to one of our contained pointer descriptors. + */ + IMPORT_C TPtrC8& PtrC(TInt aIndex); + +protected: + /** + * Leaving constructor for CLbtSubSessnPtrHolder. + * + * @publishedAll + * @param aNumberOfPtrs is the number of modifiable pointer descriptors to + * create. These are used for asynchronous 'get' requests. + * @param aNumberOfPtrCs is the number of read-only pointer descriptors to + * create. These are used for asynchronous 'set' requests. + */ + IMPORT_C void ConstructL(TInt aNumberOfPtrs, TInt aNumberOfPtrCs); +private: + /** + * TPtr8 pointer array. + */ + RArray iPtrArray; + + /** + * TPtrC8 pointer array. + */ + RArray iPtrCArray; + }; + +#endif // __LbtTERMINALPTRHOLDER_H__