#ifndef _CHANNELUTIL_H
#define _CHANNELUTIL_H

#include <CosNotifyChannelAdminS.h>
#include <CosNotificationS.h>

class ChannelUtil
{
public:

  ChannelUtil (CORBA::ORB_ptr orb);

  CosNotifyChannelAdmin::EventChannel_ptr getChannel (void);

  PortableServer::POA_ptr getRootPoa (void);

  CosNotification::StructuredEvent *createStructuredEvent (const int count);

  CORBA::Any_ptr createAnyEvent (const int count);

  void printEvent (char *buffer, const CosNotification::StructuredEvent &event, CORBA::Boolean full);

  void printEvent (char *buffer, const CORBA::Any &event, CORBA::Boolean full);

private:

  void printPropertySeq (char *buffer, const CosNotification::PropertySeq &seq);

  void printAny (char *buffer, const CORBA::Any &any);

  CORBA::ORB_var orbVar_;
};

#endif  // _CHANNELUTIL_H
