summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/AVStreams.idl
blob: 6b13d7674bf69341e3632fb454227a670081f657 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
/* -*- C++ -*- */

// $Id$

// ============================================================================
//
// = LIBRARY
//    cos
// 
// = FILENAME
//   AVStreams.idl
//
// = AUTHOR
//    OMG
//    
// 
// ============================================================================

#include "CosPropertyService.idl"

module AVStreams
// = DESCRIPTION
//    IDL for Control and Management of Audio/Video Streams
//    Revised Submission
{
  struct QoS
    // This structure represents QoS for a given type.
    // E.g. {"video_qos", <"video_framerate", 26>,
    //                    <"video_depth", 9>}
  {
    string QoSType;
    // Name of the Qos type, e.g. "video_qos"
    string QoSParams;
    // @@
    //    CosPropertyService::Properties QoSParams;
    // Sequence of name value pairs, see e.g. above.
  };
  
  typedef sequence<QoS> streamQoS;
  // The QoS of a stream is a sequence of QoS structs (defined above)
  
  typedef sequence<string> flowSpec;
  // flowSpec is used to keep transport protocol information
  // Each string is one endpoint. 
  
  typedef sequence<string> protocolSpec;
  // List of protocols supported
  // protocol names registered by OMG.
  // e.g., TCP, UDP, AAL5, IPX, RTP

  typedef sequence<octet> encryption_key;
  // Used as a key for public-key encryption

  struct SFPStatus
    // This structure is defined for SFP1.0
    // Subsequent versions of the protocol may
    // specify new structures
  {
    // = TITLE
    //   This structure is defined for SFP1.0 Subsequent versions of
    //   the protocol may specify new structures
    boolean isFormatted;
    boolean isSpecialFormat;
    boolean seqNums;
    boolean timestamps;
    boolean sourceIndicators;
  };

  enum flowState {stopped, started, dead};
  // represents the state of a flow

  enum dirType {dir_in, dir_out};
  // the direction of a flow

  struct flowStatus
    // Used to store the status of a flow
  {
    string flowName;
    dirType directionality;
    flowState status;
    SFPStatus theFormat;
    QoS theQoS;
  };

  // @@
  //  typedef CosPropertyService::Property streamEvent;
  typedef string streamEvent;
  // Used to convey events, in Basic_StreamCtrl::push_event
  
  exception notSupported {};
  // Used to indicate that an operation is not supported

  exception PropertyException {};
  // Property exception: raised by VDev::configure ()

  exception FPError { string flow_name; };
  // An flow protocol related error
  
  exception streamOpFailed
    // Raised by operations on streams
    {
      string reason;
    };

  exception streamOpDenied
    // Raised by operations on streams
    {
      string reason;
    };

  exception noSuchFlow {};
  // Used to indicate that an invalid flow name was used for the operation

  exception QoSRequestFailed
    //  Used to indicate failure in changing QoS
    {
      string reason;
    };

  // @@
  //  interface Basic_StreamCtrl : CosPropertyService::PropertySet {
  interface Basic_StreamCtrl 
    // = DESCRIPTION
    //    Base class for StreamCtrl, implements basic stream start
    //    and stop functionality
    {
      // Empty flowSpec => apply operation to all flows
      void stop (in flowSpec the_spec) raises (noSuchFlow);
      // Stop the transfer of data of the stream
      // Empty the_spec means apply operation to all flows
      
      void start (in flowSpec the_spec) raises (noSuchFlow);
      // Start the transfer of data in the stream.
      // Empty the_spec means apply operation to all flows
      
      void destroy (in flowSpec the_spec) raises (noSuchFlow);
      // Tears down the stream. This will close the connection, and delete
      // the streamendpoint and vdev associated with this stream
      // Empty the_spec means apply operation to all flows
      
      boolean modify_QoS (inout streamQoS new_qos,
                          in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed);
      // Changes the QoS associated with the stream
      // Empty the_spec means apply operation to all flows
      
      oneway void push_event (in streamEvent the_event);
      // Called by StreamEndPoint when something goes wrong
      // with a flow
      
      void set_FPStatus (in flowSpec the_spec,
                         in string fp_name,		
                         in any fp_settings)		
        raises (noSuchFlow, 
                FPError);
      // Used to control the flow protocol parameters.
      
      
      Object get_flow_connection (in string flow_name) 
        raises (noSuchFlow, 
                notSupported);
      // Not implemented in the light profile, will raise the notsupported
      // exception
      
      
      void set_flow_connection (in string flow_name,
                                in Object flow_connection)
        raises (noSuchFlow, 
                notSupported);
    };
  // Not implemented in the light profile, will raise the notsupported
  // exception

  interface Negotiator
    // = DESCRIPTION
    //    This class is used to negotiate QoS between two stream endpoints
    {
      boolean negotiate (in Negotiator remote_negotiator,
                         in streamQoS qos_spec);
      // initiates the process of negotiating the qos_spec
    };

  // forward declarations
  interface VDev;
  interface MMDevice;
  interface StreamEndPoint;
  interface StreamEndPoint_A;
  interface StreamEndPoint_B;
  
  interface StreamCtrl : Basic_StreamCtrl 
    // = DESCRIPTION
    //    Implementation the A/V StreamCtrl class. this class
    //    is used to control the stream. It should be subclassed
    //    by applications that want to provide more control features.
    {
      
      boolean bind_devs (in MMDevice a_party, in MMDevice b_party,
                         inout streamQoS the_qos,
                         in flowSpec the_flows)
        raises (streamOpFailed, 
                noSuchFlow, 
                QoSRequestFailed);
      // Establish a stream between a_party and b_party,
      // with qos the_qos, and for the flows in the_flows
      // if the_flows is empty, bind all the flows
      // Causes a connection to be established between the StreamEndpoints.
      // Returns success/failure
      
      boolean bind (in StreamEndPoint_A a_party,
                    in StreamEndPoint_B b_party,
                    inout streamQoS the_qos,
                    in flowSpec the_flows)
        raises (streamOpFailed, 
                noSuchFlow, 
                QoSRequestFailed);
      // Establish a connection between two streamendpoints. This can
      // be used if the streamendpoints have been created independent of
      // a MMDevice
      
      void unbind_party (in StreamEndPoint the_ep,
                         in flowSpec the_spec)
        raises (streamOpFailed, noSuchFlow);
      // Unbind the_ep from the stream. Empty the_spec means apply to all flows.
      
      void unbind ()
        raises (streamOpFailed);
      // unbind the stream. Same effect as Basic_StreamCtrl::destroy ()
    };
  
  // @@
  //  interface MCastConfigIf : CosPropertyService::PropertySet{
  interface MCastConfigIf 
    // multicasting operations are not supported yet  
    {
      boolean set_peer (in Object peer,
                        inout streamQoS the_qos,
                        in flowSpec the_spec)
        raises (QoSRequestFailed, 
                streamOpFailed);
      // multicasting operations are not supported yet  
      
      void configure (in CosPropertyService::Property a_configuration);
      // multicasting operations are not supported yet  
      
      void set_initial_configuration (in CosPropertyService::Properties initial);
      // multicasting operations are not supported yet  
      
      // Uses <format_name> standardised by OMG and IETF
      void set_format (in string flowName, 
                       in string format_name)
        raises (notSupported);
      // multicasting operations are not supported yet  
      
      // Note, some of these device params are standardised by OMG
      void set_dev_params (in string flowName,
                           in CosPropertyService::Properties new_params)
        raises (CosPropertyService::PropertyException,
                streamOpFailed);
      // multicasting operations are not supported yet  
      
    };

  // @@
  //  interface StreamEndPoint : CosPropertyService::PropertySet{
  interface StreamEndPoint 
    // = DESCRIPTION
    //    The Stream EndPoint. Used to implement one endpoint of a stream
    //    that implements the transport layer.
    {
      void stop (in flowSpec the_spec) 
        raises (noSuchFlow);
      // Stop the stream. Empty the_spec means, for all the flows
      
      void start (in flowSpec the_spec) 
        raises (noSuchFlow);
      // Start the stream, Empty the_spec means, for all the flows
      
      void destroy (in flowSpec the_spec) 
        raises (noSuchFlow);
      // Destroy the stream, Empty the_spec means, for all the flows
      
      boolean connect (in StreamEndPoint responder,
                       inout streamQoS qos_spec,
                       in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed, 
                streamOpFailed);
      // Called by StreamCtrl. responder is the peer to connect to
      
      boolean request_connection (in StreamEndPoint initiator,
                                  in boolean is_mcast,
                                  inout streamQoS qos,
                                  inout flowSpec the_spec)
        raises (streamOpDenied, noSuchFlow,
                QoSRequestFailed, FPError);
      // Called by the peer StreamEndPoint. The flow_spec indicates the
      // flows (which contain transport addresses etc.)
      
      boolean modify_QoS (inout streamQoS new_qos,
                          in flowSpec the_flows)
        raises (noSuchFlow, 
                QoSRequestFailed);
      // Change the transport qos on a stream
      
      boolean set_protocol_restriction (in protocolSpec the_pspec);
      // Used to restrict the set of protocols
      
      void disconnect(in flowSpec the_spec)
        raises (noSuchFlow, 
                streamOpFailed);
      // disconnect the flows
      
      void set_FPStatus (in flowSpec the_spec,
                         in string fp_name,
                         in any fp_settings)
        raises (noSuchFlow, 
                FPError);
      // Used to control the SFP parameters

      Object get_fep (in string flow_name)
        raises (notSupported, 
                noSuchFlow);
      // Not implemented in the light profile, throws notsupported
      
      string add_fep (in Object the_fep)
        // Can fail for reasons {duplicateFepName, duplicateRef}
        raises (notSupported, 
                streamOpFailed);
      // Not implemented in the light profile, throws notsupported
      
      void remove_fep (in string fep_name)
        raises (notSupported, 
                streamOpFailed);
      // Not implemented in the light profile, throws notsupported
      
      void set_negotiator (in Negotiator new_negotiator);
      // Used to "attach" a negotiator to the endpoint

      void set_key (in string flow_name, 
                    in encryption_key the_key);
      // Used for public key encryption.
    
      void set_source_id (in long source_id);
      // Used to set a unique id for packets sent by this streamendpoint
    };

  interface StreamEndPoint_A : StreamEndPoint
    // = DESCRIPTION
    //     The "A" side of a streamendpoint
    {

      boolean multiconnect (inout streamQoS the_qos,
                            inout flowSpec the_spec)
        raises (noSuchFlow, QoSRequestFailed, streamOpFailed);
      // Used for ATM-style multicast

      boolean connect_leaf (in StreamEndPoint_B the_ep,
                            inout streamQoS the_qos,
                            in flowSpec the_flows)
        raises (streamOpFailed, noSuchFlow,
                QoSRequestFailed, notSupported);
      // Used for ATM-style multicast

      void disconnect_leaf (in StreamEndPoint_B the_ep,
                            in flowSpec theSpec)
        raises(streamOpFailed, noSuchFlow);
      // Used for ATM-style multicast
    };

  interface StreamEndPoint_B : StreamEndPoint 
    {

      boolean multiconnect (inout streamQoS the_qos,
                            inout flowSpec the_spec)
        raises (streamOpFailed, noSuchFlow,
                QoSRequestFailed, FPError);
      // Used for ATM-style multicast
    };

  // @@
  //  interface VDev : CosPropertyService::PropertySet{
  interface VDev 
    // = DESCRIPTION
    //    Implements the VDev interface. One of these is created per connection,
    //    and represents device-specific parameters
    {
      boolean set_peer (in StreamCtrl the_ctrl,
                        in VDev the_peer_dev,
                        inout streamQoS the_qos,
                        in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed, 
                streamOpFailed);
      // Called to tell the vdev who the streamctrl, peer vdev is

      boolean set_Mcast_peer (in StreamCtrl the_ctrl,
                              in MCastConfigIf a_mcastconfigif,
                              inout streamQoS the_qos,
                              in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed, 
                streamOpFailed);
      // Used to set the streamctrl and multicast device

      void configure (in CosPropertyService::Property the_config_mesg)
        raises (PropertyException, 
                streamOpFailed);
      // Called by the peer VDev to configure the device (catch all)

      // Uses <formatName> standardised by OMG and IETF
      void set_format (in string flowName, 
                       in string format_name)
        raises (notSupported);
      // Used to set a format on a flowname

      // Note, some of these device params are standardised by OMG
      void set_dev_params (in string flowName,
                           in CosPropertyService::Properties new_params)
        raises (PropertyException, 
                streamOpFailed);
      // Used to set device parameters

      boolean modify_QoS (inout streamQoS the_qos,
                          in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed);
      // Called to change QoS of the device

    };

  interface MMDevice : CosPropertyService::PropertySet 
    // = DESCRIPTION
    //     Implements a factory to create Endpoints and VDevs
    {
      StreamEndPoint_A create_A (in StreamCtrl the_requester,
                                 out VDev the_vdev,
                                 inout streamQoS the_qos,
                                 out boolean met_qos,
                                 inout string named_vdev,
                                 in flowSpec the_spec)
        raises (streamOpFailed, 
                streamOpDenied, 
                notSupported,
                QoSRequestFailed, 
                noSuchFlow);
      // Called by StreamCtrl to create a "A" type streamendpoint and vdev

      StreamEndPoint_B create_B(in StreamCtrl the_requester,
                                out VDev the_vdev,
                                inout streamQoS the_qos,
                                out boolean met_qos,
                                inout string named_vdev,
                                in flowSpec the_spec)
        raises (streamOpFailed, 
                streamOpDenied, 
                notSupported,
                QoSRequestFailed, 
                noSuchFlow);
      // Called by StreamCtrl to create a "B" type streamendpoint and vdev
    
      StreamCtrl bind (in MMDevice peer_device,
                       inout streamQoS the_qos,
                       out boolean is_met,
                       in flowSpec the_spec)
        raises (streamOpFailed, 
                noSuchFlow, 
                QoSRequestFailed);
      // Can be used to request the MMDevice to create a new StreamCtrl,
      // and call bind_devs on it
    
      StreamCtrl bind_mcast (in MMDevice first_peer,
                             inout streamQoS the_qos,
                             out boolean is_met,
                             in flowSpec the_spec)
        raises (streamOpFailed, 
                noSuchFlow, 
                QoSRequestFailed);
      // Multicast bind

      void destroy (in StreamEndPoint the_ep, 
                    in string vdev_name)
        // ie VDev not found
        raises (notSupported);
      // Remove the StreamEndPoint and the related vdev
     
      string add_fdev (in Object the_fdev)
        raises (notSupported, 
                streamOpFailed);
      // Not supported in the light profile, raises notsupported

      Object get_fdev (in string flow_name)
        raises (notSupported, 
                noSuchFlow);
      // Not supported in the light profile, raises notsupported

      void remove_fdev (in string flow_name)
        raises (notSupported, 
                noSuchFlow);
      // Not supported in the light profile, raises notsupported
    };
};