webservices/wsconnectionagent/inc/senconnagentserver.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2009 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: Header declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 NONSHARABLE_CLASS(CSenConnAgentServer): public CServer2
       
    27     {
       
    28     public:
       
    29     IMPORT_C static const TDesC& Open();
       
    30     IMPORT_C static void Close();
       
    31     inline void DestroyIfInactive();
       
    32     
       
    33     private:
       
    34     CSenConnAgentServer();
       
    35    ~CSenConnAgentServer();
       
    36     CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
       
    37     
       
    38     private:
       
    39     TInt iCount;
       
    40     TFullName iName;
       
    41     };
       
    42 
       
    43 void CSenConnAgentServer::DestroyIfInactive()
       
    44     {
       
    45     iSessionIter.SetToFirst();
       
    46     if (iSessionIter++ == NULL)
       
    47         {
       
    48         delete this;
       
    49         Dll::SetTls(NULL);
       
    50         }
       
    51     }