00001 #ifndef logging_acsstructuredpushsupplier_H 00002 #define logging_acsstructuredpushsupplier_H 00003 /******************************************************************************* 00004 * ALMA - Atacama Large Millimiter Array 00005 * (c) European Southern Observatory, 2002 00006 * Copyright by ESO (in the framework of the ALMA collaboration) 00007 * and Cosylab 2002, All rights reserved 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2.1 of the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 * 00023 * "@(#) $Id: loggingACSStructuredPushSupplier.h,v 1.6 2008/09/29 08:36:42 cparedes Exp $" 00024 * 00025 * who when what 00026 * -------- ---------- ---------------------------------------------- 00027 * msekoran 2001-06-17 created 00028 */ 00029 00030 #ifndef __cplusplus 00031 #error This is a C++ include file and cannot be used from plain C 00032 #endif 00033 00034 #include <acsutil.h> 00035 00036 #include <orbsvcs/CosNotifyChannelAdminS.h> 00037 #include <orbsvcs/CosNotifyCommC.h> 00038 00043 class ACSStructuredPushSupplier : public POA_CosNotifyComm::StructuredPushSupplier, 00044 public PortableServer::RefCountServantBase 00045 { 00046 // = TITLE 00047 // StructuredPushSupplier 00048 // 00049 // = DESCRIPTION 00050 // Supplier 00051 // 00052 public: 00053 // = Initialization and Termination code 00054 ACSStructuredPushSupplier (void); 00055 // Constructor. 00056 00057 void connect (CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin); 00058 // Connect the Supplier to the EventChannel. 00059 // Creates a new proxy supplier and connects to it. 00060 00061 void disconnect (); 00062 // Disconnect from the supplier. 00063 00064 virtual void send_event (const CosNotification::StructuredEvent& event); 00065 // Send one event. 00066 00067 00068 // = NotifySubscribe 00069 /* 00070 * = NotifySubscribe 00071 * \throw CosNotifyComm::InvalidEventType 00072 */ 00073 virtual void subscription_change (const CosNotification::EventTypeSeq & added, 00074 const CosNotification::EventTypeSeq & removed); 00075 00076 // = StructuredPushSupplier method 00077 virtual void disconnect_structured_push_supplier (); 00078 00079 protected: 00080 // = Data members 00081 CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxy_consumer_; 00082 // The proxy that we are connected to. 00083 00084 CosNotifyChannelAdmin::ProxyID proxy_consumer_id_; 00085 // This supplier's id. 00086 00087 // = Protected Methods 00088 virtual ~ACSStructuredPushSupplier (); 00089 // Destructor 00090 00091 }; 00092 00093 #endif