obex/obexprotocol/obex/test/tobex/serverasyncao.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SERVERASYNCCAO_H
       
    17 #define __SERVERASYNCCAO_H
       
    18 
       
    19 #include <obexconstants.h>
       
    20 #include <obexbase.h>
       
    21 
       
    22 class CConsoleBase;
       
    23 class CObexServer;
       
    24 
       
    25 class CServerAsyncAO : public CActive
       
    26 	{
       
    27 public:
       
    28     static CServerAsyncAO* NewL(CObexServer& aObexServer);
       
    29 	
       
    30 	~CServerAsyncAO();
       
    31 	void CompletionIndication(CObex::TOperation aOpcode, TObexResponse aResponse);
       
    32     void RequestIndication(CObex::TOperation aOpcode, CObexBaseObject* aObject);
       
    33 
       
    34     void RunL();
       
    35 
       
    36 private:
       
    37 	CServerAsyncAO(CObexServer& aObexServer);
       
    38 	void ConstructL();
       
    39 	void DoCancel();
       
    40 private:
       
    41     CConsoleBase* iConsole;
       
    42     CObexServer& iObexServer;
       
    43     CObexBaseObject* iObject;
       
    44 
       
    45     enum TIndicationState
       
    46     	{
       
    47     	ERequestIndication,
       
    48     	ECompleteIndication
       
    49     	};
       
    50     TIndicationState iState;
       
    51     TObexResponse iDefaultResponse;
       
    52     };
       
    53 
       
    54 #endif //SERVERASYNCCAO_H
       
    55