ncdengine/engine/transport/inc/catalogsnetworkmanager.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:   Class CCatalogsNetworkManager declation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CATALOGSNETWORKMANAGER_H
       
    20 #define C_CATALOGSNETWORKMANAGER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <es_sock.h>
       
    24 #include <es_enum.h>
       
    25 
       
    26 #include "catalogshttptypes.h"
       
    27 #include "catalogsaccesspointobserver.h"
       
    28 
       
    29 
       
    30 /**
       
    31 */
       
    32 class CCatalogsNetworkManager : public CBase
       
    33     {
       
    34 public:
       
    35 
       
    36     static CCatalogsNetworkManager* NewL();
       
    37 
       
    38     virtual ~CCatalogsNetworkManager();
       
    39     
       
    40 public:
       
    41 
       
    42     void UpdateConnectionsL();
       
    43     TBool IsAccessPointOpen( const TCatalogsConnectionMethod& aAp );
       
    44        
       
    45     void OpenAccessPointL( const TCatalogsConnectionMethod& aAp );
       
    46     void CloseAccessPointL( const TCatalogsConnectionMethod& aAp );
       
    47     
       
    48     void NotifyAccessPointReallyClosedL( const TCatalogsConnectionMethod& aAp );
       
    49     
       
    50     void AddObserverL( MCatalogsAccessPointObserver& aObserver );
       
    51     void RemoveObserver( MCatalogsAccessPointObserver& aObserver );
       
    52 
       
    53 private:
       
    54 
       
    55     void NotifyAccessPointObserversL( 
       
    56         const TCatalogsConnectionMethod& aAp,
       
    57         const TCatalogsAccessPointEvent& aEvent );
       
    58 
       
    59     void ConstructL();    
       
    60 private:
       
    61 
       
    62     RSocketServ iSs;
       
    63     RConnection iConnection;
       
    64     TUint iConnectionCount;
       
    65     
       
    66     // Observers are not owned
       
    67     RPointerArray<MCatalogsAccessPointObserver> iObservers;  
       
    68             
       
    69     };
       
    70 
       
    71 #endif // C_CATALOGSNETWORKMANAGER_H