landmarks/locationlandmarks/server/inc/EPos_CPosLmSubsessionBase.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: Base class for subsessions.
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPOSLMSUBSESSIONBASE_H
       
    21 #define CPOSLMSUBSESSIONBASE_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPosLmServer;
       
    28 
       
    29 /**
       
    30 * Base class for subsessions.
       
    31 */
       
    32 class CPosLmSubsessionBase : public CObject
       
    33     {
       
    34 
       
    35     public:  // Data types
       
    36 
       
    37         /**
       
    38         *  Specifies the type of a subsession class.
       
    39         */
       
    40         enum TSubsessionType
       
    41             {
       
    42             EPosLocalAccessSubsession = 0,
       
    43             /**< subclass CPosLmLocalAccessSubsession */
       
    44             EPosEventListenerSubsession,
       
    45             /**< subclass CPosLmEventListenerSubsession */
       
    46             EPosLocalDbManProviderSubsession
       
    47             /**< subclass CPosLmLocalDbManProviderSubsession */
       
    48             };
       
    49 
       
    50     public: // Constructors and destructor
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CPosLmSubsessionBase();
       
    56 
       
    57     public: // New functions
       
    58 
       
    59         /**
       
    60         * Returns the subsession type.
       
    61         *
       
    62         * @returns The subsession type.
       
    63         */
       
    64         TSubsessionType SubsessionType() const;
       
    65 
       
    66         /**
       
    67         * Handles the servicing of client requests to the server.
       
    68         *
       
    69         * @param aMessage The message containing the client request.
       
    70         */
       
    71         virtual void ServiceL(
       
    72         /* IN */        const RMessage2& aMessage
       
    73         ) = 0;
       
    74 
       
    75     protected:
       
    76 
       
    77         /**
       
    78         * C++ default constructor.
       
    79         *
       
    80         * @param aSubsessionType Subsession type.
       
    81         * @param aLmServer Reference to the landmark server.
       
    82         */
       
    83         CPosLmSubsessionBase(
       
    84         /* IN */ TSubsessionType aSubsessionType,
       
    85         /* IN */ CPosLmServer* aLmServer);
       
    86 
       
    87         /**
       
    88         * Retrieves the landmarks server instance.
       
    89         *
       
    90         * @return A pointer to the landmarks server object.
       
    91         */
       
    92         CPosLmServer* Server();
       
    93 
       
    94 
       
    95 
       
    96     private:    // Data
       
    97 
       
    98         TSubsessionType iSubsessionType;
       
    99         CPosLmServer*   iLmServer;
       
   100 
       
   101 
       
   102     };
       
   103 
       
   104 #endif //CPOSLMSUBSESSIONBASE_H
       
   105 
       
   106 // End of File