--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/csockethandler.h Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,69 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// @internalTechnology
+//
+//
+
+#ifndef __CSOCKETHANDLER_H__
+#define __CSOCKETHANDLER_H__
+
+#include <e32base.h>
+#include <e32cmn.h>
+#include <es_mbuf.h>
+#include <es_sock.h>
+#include <sockhandlerdefs.h>
+#include <eintsock.h>
+
+// Forward class references.
+class MSocketHandlerObserver;
+
+using namespace SockHandler;
+/**
+This is an active object which performs all the asynchronous operations of RInternalSocket.
+On completion of the operation CSocketHandler will notify its observer.
+
+@internalComponent
+*/
+class CSocketHandler : public CActive
+ {
+ public:
+ CSocketHandler ( RInternalSocket& aSocket, MSocketHandlerObserver& aObserver );
+ CSocketHandler ( MSocketHandlerObserver& aObserver );
+ ~CSocketHandler ();
+
+ void Activate ( const TSocketHandlerParams& aParams );
+ TBool IsRunning ( TOperation aOperation );
+
+ protected:
+ // CActive overloads
+ void RunL ();
+ void DoCancel ();
+
+ private:
+ void NotifyCompletion ();
+ void CancelCurrent ();
+ void CompleteSelf ( TInt aError );
+
+ private:
+ RInternalSocket iSocket;
+ MSocketHandlerObserver& iObserver; // Observer for socket operational success completion & error conditons
+ TOperation iOperation;
+
+ RMBufChain iBufChain;
+ TSockAddr iSockAddr;
+ RInternalSocket iAcceptingSocket;
+ TSockXfrLength iLength;
+ };
+
+#endif // __CSOCKETHANDLER_H__