blob: 9db8b4dcf1d2c799045d7b371e6c72f4e9434cb7 (
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
68
69
70
71
72
73
|
/**
* @file Common.idl
* @author Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
* @author William R. Otte <wotte@dre.vanderbilt.edu>
* @author Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
* $Id$
* Contains common IDL definitions in the Publish/Subscribe Real-time CORBA
* Stock Quoter Service.
*/
#ifndef QUOTER_COMMON_IDL
#define QUOTER_COMMON_IDL
#include "tao/StringSeq.pidl"
module Stock
{
exception Invalid_Stock
{
};
/// Contains information about a single stock.
struct StockInfo
{
string name;
long high;
long low;
long last;
};
/// Used to communicate an available update.
valuetype StockNames
{
public CORBA::StringSeq names;
};
valuetype Cookie
{
public string cookie_id;
};
interface Trigger
{
void start ();
void stop ();
};
/**
* @class StockNameConsumer
* @brief Callback interface used by the distributor to notify brokers of updates.
*/
interface StockNameConsumer
{
void push_StockName (in StockNames the_stocknames);
attribute Cookie cookie_;
};
/**
* @class StockQuoter
* @brief Provides an interface for brokers to get detailed stock information.
*/
interface StockQuoter
{
/// Returns detailed stock information to brokers.
/// @param stockname A valid name for a stock.
/// @returns Completed stockinfo struct.
StockInfo get_stock_info (in string stock_name) raises (Invalid_Stock);
};
};
#endif
|