home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.1 KB | 83 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWHFConn.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWHFCONN_H
- #define FWHFCONN_H
-
- #ifndef FWCONNEC_H
- #include "FWConnec.h"
- #endif
-
- #ifndef FWINTERE_H
- #include "FWIntere.h"
- #endif
-
- #ifndef FWORDCOL_H
- #include "FWOrdCol.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // CLASS FW_MReceiver
- //========================================================================================
-
- class FW_CLASS_ATTR FW_MReceiver
- {
- public:
- FW_MReceiver();
- virtual ~FW_MReceiver();
-
- virtual void HandleNotification(const FW_CNotification& notification) = 0;
- };
-
- //========================================================================================
- // CLASS FW_CHandleFunctionConnection
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CHandleFunctionConnection : public FW_CConnection
- {
- public:
- FW_CHandleFunctionConnection(FW_MReceiver* receiver);
- virtual ~FW_CHandleFunctionConnection();
-
- FW_MReceiver* GetReceiver() const;
-
- virtual void AddInterest(const FW_CInterest& interest);
- virtual void RemoveAllInterests();
- virtual void RemoveInterest(const FW_CInterest& interest);
-
- virtual void Notify(const FW_CNotification& notification,
- const FW_CInterest& interest);
-
- virtual void Connect();
- virtual void Disconnect();
-
- private:
- FW_MReceiver* fReceiver;
- FW_CPrivOrderedCollection fInterestList;
- };
-
- //----------------------------------------------------------------------------------------
- // FW_CHandleFunctionConnection::GetReceiver
- //----------------------------------------------------------------------------------------
-
- inline FW_MReceiver* FW_CHandleFunctionConnection::GetReceiver() const
- {
- return fReceiver;
- }
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-