libraries/iosrv/server/endpoint.h
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // endpoint.h
       
     2 // 
       
     3 // Copyright (c) 2006 - 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "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 // Accenture - Initial contribution
       
    11 //
       
    12 
       
    13 #ifndef __ENDPOINT_H__
       
    14 #define __ENDPOINT_H__
       
    15 
       
    16 #include <e32base.h>
       
    17 #include "readwrite.h"
       
    18 
       
    19 
       
    20 class CIoEndPoint : public CIoObject, public MIoReadEndPoint, public MIoWriteEndPoint
       
    21 	{
       
    22 public:
       
    23 	~CIoEndPoint();
       
    24 public: // From MIoEndPoint:
       
    25 	virtual TName IoepName() const;
       
    26 	virtual TBool IoepIsType(RIoHandle::TType aType) const;
       
    27 public: // From MIoReadEndPoint.
       
    28 	virtual void IorepAttachL(MIoReader& aReader, RIoEndPoint::TReadMode aMode);
       
    29 	virtual void IorepDetach(MIoReader& aReader);
       
    30 	virtual void IorepSetForegroundReaderL(MIoReader& aReader);
       
    31 	virtual TBool IorepIsForegroundL(const MIoReader& aReader) const;
       
    32 private: // From MIoWriteEndPoint.
       
    33 	virtual void IowepAttachL(MIoWriter& aWriter);
       
    34 	virtual void IowepDetach(MIoWriter& aWriter);
       
    35 private: // New.
       
    36 	virtual TInt HandleReaderAttached(MIoReader& aReader);
       
    37 	virtual void HandleReaderDetached(MIoReader& aReader);
       
    38 	virtual void ForegroundReaderChanged();
       
    39 	virtual TInt HandleWriterAttached(MIoWriter& aWriter);
       
    40 	virtual void HandleWriterDetached(MIoWriter& aWriter);
       
    41 protected:
       
    42 	virtual void HandleForegroundReaderChanged();
       
    43 protected:
       
    44 	CIoEndPoint();
       
    45 	TInt NumAttachedReaders() const;
       
    46 	MIoReader* AttachedReader(TInt aIndex = 0);
       
    47 	TInt NumAttachedWriters() const;
       
    48 private:
       
    49 	TInt FindReader(MIoReader& aReader) const;
       
    50 	TInt FindReader(const MIoReader& aReader) const;
       
    51 private:
       
    52 	TInt iAttachedWriterCount;
       
    53 	RPointerArray<MIoReader> iAttachedReaders;
       
    54 	};
       
    55 
       
    56 #endif // __ENDPOINT_H__
       
    57