5 Copyright (c) 1995-1997 by Be Incorporated. All Rights Reserved.
11 #include <SupportDefs.h>
13 /****************************************************************
14 This file defines the messages sent between a Subscriber and a
15 Server. Changes to the protocol should be noted here and appropriate
16 modifications made to Subscriber.cpp and any servers (currently
17 the audio_server is the only one).
19 BufferMsgs defines a message-based interface, not a class
20 interface. A BufferMsgs receives messages from Subscribers via the
23 Here are the messages that must be supported for the base Subscriber
24 class and the replies that a server will send. Specific Servers
25 may support other messages as well.
28 Acquire a stream-id for subsequent operations.
29 'resource' is a server-specific value that specifies the resource
30 to which the client wants access.
32 Upon success, the server replies with 'stream_id' (used for
33 subsequent operations).
35 GET_STREAM_ID int32("resource")
36 => GET_STREAM_ID int32("stream_id")
37 => ERROR_RETURN int32("error")
40 Acquire access to a stream for subsequent operations.
41 'stream_id' specifies the stream to which the client wants access.
42 'will_wait' determines if the client will receive an immediate reply
43 or if it will block until access is granted. 'sem' is a semaphore
44 used to indicate that the stream has released a buffer.
46 Upon success, the server replies with 'subscriber_id' (used for
47 subsequent operations).
49 SUBSCRIBE String("name")
53 => SUBSCRIBE int32("subscriber_id")
54 => ERROR_RETURN int32("error")
57 Relinquish access to the stream.
59 UNSUBSCRIBE int32("subscriber_id")
61 => ERROR_RETURN int32("error")
64 Join the stream at the specified position and start receiving buffers
66 ENTER_STREAM int32("subscriber_id")
70 => ERROR_RETURN int32("error")
73 Issue a request to stop receiving buffers. More buffers may continue
74 to arrive, but you must keep acquiring_ and releasing_ them until you
75 get one for which is_last_buffer() is true. Then you can stop.
77 EXIT_STREAM int32("subscriber_id")
79 => ERROR_RETURN int32("error")
82 Get information about a particular buffer stream.
84 GET_STREAM_PARAMS int32("stream_id")
85 => GET_STREAM_PARAMS int32("buffer_size")
88 int32("subscriber_count")
89 => ERROR_RETURN int32("error")
91 Set information about a particular buffer stream.
93 SET_STREAM_PARAMS int32("stream_id")
94 int32("buffer_size") <<optional>>
95 int32("buffer_count") <<optional>>
96 Bool("is_running") <<optional>>
97 => SET_STREAM_PARAMS int32("buffer_size")
100 int32("subscriber_count")
101 => ERROR_RETURN int32("error")
104 Return the subscriber id of the index'th subscriber sharing the
105 stream with the given subscriber.
107 SUBSCRIBER_INFO int32("subscriber_id")
108 => SUBSCRIBER_INFO String("subscriber_name")
109 int32("stream_id") // granted access to
110 int32("position") // position (if active) or -1
111 => ERROR_RETURN int32("error")
113 <end of long comment>
114 ****************************************************************/
123 GET_STREAM_PARAMETERS
,
124 SET_STREAM_PARAMETERS
,
130 #endif // #ifndef _BUFFER_MSGS_H