00001 #ifndef _BULKDATA_RECEIVER_IMPL_H 00002 #define _BULKDATA_RECEIVER_IMPL_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 * 00024 * "@(#)" 00025 * 00026 * who when what 00027 * -------- -------- ---------------------------------------------- 00028 * oat 30/03/04 created 00029 */ 00030 00031 /************************************************************************ 00032 * 00033 *---------------------------------------------------------------------- 00034 */ 00035 00036 #ifndef __cplusplus 00037 #error This is a C++ include file and cannot be used from plain C 00038 #endif 00039 00040 #include <baci.h> 00041 #include <baciCharacteristicComponentImpl.h> 00042 #include <maciHelper.h> 00043 #include <maciContainerServices.h> 00044 00045 #include "ACSBulkDataStatus.h" 00046 00047 #include "bulkDataReceiverS.h" 00048 00049 #include "bulkDataReceiver.h" 00050 00051 00074 template<class TCallback> 00075 class BulkDataReceiverImpl : public baci::CharacteristicComponentImpl, 00076 public virtual POA_bulkdata::BulkDataReceiver 00077 { 00078 public: 00079 00085 BulkDataReceiverImpl(const ACE_CString& name,maci::ContainerServices* containerServices); 00086 00090 virtual ~BulkDataReceiverImpl(); 00091 00092 void cleanUp(); 00093 00094 virtual AcsBulkdata::BulkDataReceiver<TCallback> * getReceiver() 00095 { 00096 return & receiver; 00097 } 00098 00110 virtual void openReceiver() ; 00111 00112 virtual void openReceiverStream(const char * stream_name); 00113 00117 bulkdata::BulkDataReceiverConfig * getReceiverConfig(); 00118 00122 virtual void closeReceiver(); 00123 00124 virtual void closeReceiverStream(const char * stream_name); 00125 00130 virtual ACSErr::Completion *getCbStatus(CORBA::ULong flowNumber); 00131 00136 virtual void setTimeout(CORBA::ULong flowNumber, CORBA::ULong timeout); 00137 00141 virtual void setRecvName(const char *recvName); 00142 00146 virtual void subscribeNotification(ACS::CBvoid_ptr notifCb); 00147 00156 void fwdData2UserCB(CORBA::Boolean enable); 00157 00158 protected: 00159 00160 00161 private: 00162 00163 AcsBulkdata::BulkDataReceiver<TCallback> receiver; 00164 00165 maci::ContainerServices *containerServices_p; 00166 }; 00167 00168 #include "bulkDataReceiverImpl.i" 00169 00170 #endif