summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.h
blob: c799a38451edcb460cf61f9d7fdcfcd0b95a162a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* -*- C++ -*- */
/**
 *  @file StructuredEvent.h
 *
 *  $Id$
 *
 *  @author Pradeep Gore <pradeep@oomworks.com>
 *
 *
 */

#ifndef TAO_Notify_Tests_STRUCTUREDEVENT_H
#define TAO_Notify_Tests_STRUCTUREDEVENT_H

#include /**/ "ace/pre.h"
#include "notify_test_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "orbsvcs/CosNotificationC.h"

/**
 * @class TAO_Notify_Tests_StructuredEvent
 *
 * @brief Helper class to populate a CosNotification::StructuredEvent.
 *
 */
class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_StructuredEvent
{
public:
  /// Constructor
  TAO_Notify_Tests_StructuredEvent (void);
  TAO_Notify_Tests_StructuredEvent (const char* name);
  TAO_Notify_Tests_StructuredEvent (const char* domain, const char* type);
  TAO_Notify_Tests_StructuredEvent (const char* name, const char* domain, const char* type);

  /// Destructor
  ~TAO_Notify_Tests_StructuredEvent ();

  void name (const char* name);
  void type (const char* domain, const char* type);

  const char* type (void);

  /// add <name,value> to optional header sequence.
  void opt_header (const char* name, CORBA::Any& value);

  /// add <name,value> to filterable body sequence.
  void filter (const char* name, CORBA::Any& value);

  /// add <name,value> to variable header sequence.
  void qos (const char* name, CORBA::Any& value);

  /// The remainder_of_body
  void payload (CORBA::Any& value);

  /// access the underlying event.
  CosNotification::StructuredEvent& event (void);

private:
  CosNotification::StructuredEvent event_;
};

#include /**/ "ace/post.h"
#endif /* TAO_Notify_Tests_STRUCTUREDEVENT_H */