supl/locationsuplfw/gateway/inc/epos_csuplsubsessionregistry.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 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:   Registry for subsessions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CSuplSubSessionRegistry_H__
       
    21 #define __CSuplSubSessionRegistry_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CSuplIPCSubSession;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  Class to handle subsession registry entries for a session 
       
    33 */
       
    34 class CSuplSubsessionRegistry :public CBase
       
    35 	{
       
    36     public:  // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * Two-phased constructor
       
    40         *
       
    41         * @return a new instance of this class
       
    42         */
       
    43 		static CSuplSubsessionRegistry* NewL();
       
    44 
       
    45         /**
       
    46         * C++ destructor
       
    47         */
       
    48 		~CSuplSubsessionRegistry();
       
    49 
       
    50 	public:		// New functions
       
    51 
       
    52         /**
       
    53         * Retreives the appropriate subsession.
       
    54         *
       
    55         * @param aHandle the subsession handle
       
    56         * @return a subsession
       
    57         */
       
    58         CSuplIPCSubSession* SubSessionFromHandleL(
       
    59             /* IN  */   TUint aHandle
       
    60             );
       
    61 
       
    62         /**
       
    63         * Retreives the appropriate subsession.
       
    64         *
       
    65         * @param aIndex the index in the list
       
    66         * @return a subsession, NULL if no session at specified index.
       
    67         */
       
    68         CSuplIPCSubSession* SubSessionFromIndex(
       
    69             /* IN  */   TInt aIndex
       
    70             );
       
    71 
       
    72         /**
       
    73         * Returns the maximum number of reference counting 
       
    74 		* objects that the object index can hold before 
       
    75 		* internal buffers need to be expanded.
       
    76         * @return the maximum number of reference counting objects.
       
    77         */
       
    78         TInt Count();
       
    79 
       
    80         /**
       
    81         * Closes a subsession.
       
    82         *
       
    83         * @param aHandle a handle to the subsession
       
    84         */
       
    85         void CloseSubSession(
       
    86             /* IN  */        TUint aHandle
       
    87             );
       
    88 
       
    89         /**
       
    90         * Adds an object instance to the registry and
       
    91         * transfers object ownership to the registry.
       
    92         *
       
    93         * @param aSubSession an object instance
       
    94         * @return a registry handle to the object instance.
       
    95         */
       
    96         TInt AddInstanceL(
       
    97             /* IN  */     CSuplIPCSubSession* aSubSession
       
    98             );
       
    99 
       
   100     private:
       
   101 
       
   102         /**
       
   103         * C++ default constructor.
       
   104         */
       
   105         CSuplSubsessionRegistry();
       
   106 
       
   107         /**
       
   108         * By default EPOC constructor is private.
       
   109         */
       
   110         void ConstructL();
       
   111 
       
   112         // By default, prohibit copy constructor
       
   113         CSuplSubsessionRegistry( const CSuplSubsessionRegistry& );
       
   114         // Prohibit assigment operator
       
   115         CSuplSubsessionRegistry& operator= ( const CSuplSubsessionRegistry& );
       
   116 
       
   117     private:	// Data
       
   118 
       
   119         CObjectIx*      iRegistryIndex;
       
   120         CObjectCon*     iRegistryContainer;
       
   121         CObjectConIx*   iRegistryContainerIndex;
       
   122     };
       
   123 
       
   124 
       
   125 #endif // __CSuplSubSessionRegistry_H__
       
   126 
       
   127 // End of File