realtimenetprots/sipfw/ProfileAgent/ProxyResolver/src/CProxyResolveActor.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005-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:
       
    15 * Name          : CProxyResolveActor.h
       
    16 * Part of       : ProxyResolver
       
    17 * Version       : SIP/4.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef CPROXYRESOLVEACTOR_H
       
    29 #define CPROXYRESOLVEACTOR_H
       
    30 
       
    31 // INCLUDES
       
    32 #include <e32base.h>
       
    33 #include <es_sock.h>
       
    34 #include "MQueryObserver.h"
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CProxyResolvingQueue;
       
    38 class CProxyQuery;
       
    39 class MSIPProxyResolverObserver;
       
    40 
       
    41 
       
    42 class CProxyResolveActor : 
       
    43         public CActive,
       
    44         public MQueryObserver
       
    45     {
       
    46 public:
       
    47 
       
    48     static CProxyResolveActor* NewL ();
       
    49     
       
    50     static CProxyResolveActor* NewLC ();
       
    51     
       
    52     ~CProxyResolveActor ();
       
    53     
       
    54     // actual resolver function
       
    55     void ResolveProxyL ( TUint&                     aRequestId, 
       
    56                          TUint32                    aIapId, 
       
    57                          MSIPProxyResolverObserver& aObserver );
       
    58                        
       
    59     // cancel spesific query
       
    60     void CancelById ( TUint aRequestId );
       
    61 
       
    62 public: // From CActive
       
    63 
       
    64     void RunL (); 
       
    65     TInt RunError (TInt aError);
       
    66     void DoCancel ();
       
    67 
       
    68 private:
       
    69 
       
    70     void ConstructL ();
       
    71     
       
    72     CProxyResolveActor ();
       
    73     
       
    74     // process next query
       
    75     void ResolveNext ();
       
    76     
       
    77     // make the actual DHCP query
       
    78     void PerformDHCPQuery();
       
    79     
       
    80     // MQueryObserver callback: RConnection opened
       
    81     void ConnectionReady( CProxyQuery* aQuery);
       
    82 
       
    83     // MQueryObserver callback: RConnection failed
       
    84     void ErrorOccured( TInt aError, CProxyQuery* aQuery );
       
    85     
       
    86 
       
    87 private: // Data
       
    88 
       
    89     CProxyResolvingQueue* iRequestQueue;    
       
    90     CProxyQuery* iCurrentQuery;
       
    91     RSocketServ   iServer;    
       
    92 
       
    93 #ifdef CPPUNIT_TEST
       
    94     friend class CProxyResolveActorTest;
       
    95 #endif
       
    96     };
       
    97 
       
    98 #endif // CPROXYRESOLVEACTOR_H
       
    99 
       
   100 // End of File