phoneclientserver/phoneserver/Inc/Standard/PhSrvSubSessionFactory.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     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:  Sub Session Factory.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PHSRVSUBSESSIONFACTORY_H
       
    20 #define PHSRVSUBSESSIONFACTORY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPhSrvSession;
       
    28 class CPhSrvSubSessionBase;
       
    29 
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  Subsession creation factory.
       
    35 *
       
    36 *  @since 1.0
       
    37 */
       
    38 class PhSrvSubSessionFactory
       
    39     {
       
    40     public: // New functions
       
    41 
       
    42         /**
       
    43         * Whether or not a specified function should result in a new 
       
    44         * subsession being created.
       
    45         *
       
    46         * @param aFunction Function to be evaluated.
       
    47         * @return ETrue if the function (opcode) requires a new subsession.
       
    48         */
       
    49         static TBool PhSrvSubSessionFactoryIsCreationFunction(TInt aFunction);
       
    50 
       
    51         /**
       
    52         * Create a new subsession according to the function (opcode) type.
       
    53         *
       
    54         * @param aFunction Function to be created.
       
    55         * @param aSession Session where the subsession belongs.
       
    56         * @return A new subsession, left on the cleanup stack.
       
    57         */
       
    58         static CPhSrvSubSessionBase* PhSrvSubSessionFactoryCreateLC( 
       
    59             TInt aFunction, 
       
    60             CPhSrvSession& aSession );
       
    61             
       
    62         /**
       
    63         * Check Secure ID for a new subsession.
       
    64         *
       
    65         * @param aFunction Function to be created.
       
    66         * @param aSID Secure ID of the process
       
    67         * @return ETrue if a new subsession creation is allowed
       
    68         */     
       
    69         static TBool PhSrvSubSessionFactoryIsCreationAllowed(
       
    70             TInt aFunction,
       
    71             TUint32 aSID );   
       
    72     
       
    73     };
       
    74 
       
    75 #endif      // PHSRVSUBSESSIONFACTORY_H
       
    76 
       
    77 
       
    78 // End of File