• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

basencSupplier.h

Go to the documentation of this file.
00001 #ifndef basenc_supplier_H
00002 #define basenc_supplier_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: basencSupplier.h,v 1.6 2008/09/30 09:34:43 cparedes Exp $"
00024  *
00025  * who       when        what
00026  * --------  ----------  ----------------------------------------------
00027  * dfugate  2005-11-10  created
00028  */
00029 
00030 #ifndef __cplusplus
00031 #error This is a C++ include file and cannot be used from plain C
00032 #endif
00033 
00038 #include <orbsvcs/CosNotifyChannelAdminS.h>
00039 #include <orbsvcs/CosNotifyCommC.h>
00040 #include <orbsvcs/CosNamingC.h>
00041 #include <acsncS.h>
00042 #include "basencHelper.h"
00043 
00047 class BaseSupplier : public POA_acsnc::OSPushSupplier,
00048                      public PortableServer::RefCountServantBase,
00049                      public BaseHelper
00050 {
00051   public:
00052     
00058     BaseSupplier(const char* channelName, const char* notifyServiceDomainName = 0);
00059     
00063     virtual void 
00064     disconnect();
00065     
00070     void
00071     init(CosNaming::NamingContext_ptr nc_p);
00072     
00073     //--CORBA methods defined here-----------------------------------------
00079     virtual void 
00080     subscription_change(const CosNotification::EventTypeSeq &added,
00081                         const CosNotification::EventTypeSeq &removed);
00082     
00087     virtual void 
00088     disconnect_structured_push_supplier();
00089     //----------------------------------------------------------------------
00090   protected:
00094     virtual ~BaseSupplier();
00095     
00102     void 
00103     publishEvent(const CosNotification::StructuredEvent& event);
00104 
00109     virtual void
00110     populateHeader(CosNotification::StructuredEvent& event);
00111     
00112     
00117     virtual const char*
00118     getEventType() = 0;
00119 
00124     virtual const char*
00125     getEventName()
00126         { return ""; }
00127 
00128 
00129     
00130     
00131 
00132     
00133 
00141     virtual acsnc::OSPushSupplier_ptr
00142     getCORBARef();
00143 
00144     
00145 
00146   private:
00152     void 
00153     connect();
00154     
00159     CosNotifyChannelAdmin::SupplierAdmin_var supplierAdmin_m;
00160 
00164     CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m;
00165     
00169     CosNotifyChannelAdmin::ProxyID proxyConsumerID_m;
00170 
00171     
00172 
00176      CosNotifyChannelAdmin::AdminID adminID_m;
00177 
00181     acsnc::OSPushSupplier_var corbaRef_m;
00182 };
00183 
00184 #endif

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0