4
>bonobo-stream-client</TITLE
7
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
10
TITLE="Libbonobo Reference Manual"
11
HREF="index.html"><LINK
13
TITLE="Libbonobo API Reference Manual"
16
TITLE="bonobo-storage"
17
HREF="libbonobo-bonobo-storage.html"><LINK
20
HREF="libbonobo-bonobo-types.html"></HEAD
43
>Libbonobo Reference Manual</FONT
52
HREF="libbonobo-bonobo-storage.html"
57
><<< Previous Page</B
106
HREF="libbonobo-bonobo-types.html"
111
>Next Page >>></B
120
NAME="LIBBONOBO-BONOBO-STREAM-CLIENT"
121
>bonobo-stream-client</A
130
>bonobo-stream-client -- Simplified client wrapper functions for the Stream interface</DIV
132
CLASS="REFSYNOPSISDIV"
150
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE"
151
>bonobo_stream_client_write</A
152
> (const Bonobo_Stream stream,
155
CORBA_Environment *ev);
157
HREF=../glib/glib-basic-types.html#GUINT8
159
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-READ"
160
>bonobo_stream_client_read</A
161
> (const Bonobo_Stream stream,
163
CORBA_long *length_read,
164
CORBA_Environment *ev);
166
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE-STRING"
167
>bonobo_stream_client_write_string</A
169
(const Bonobo_Stream stream,
172
HREF=../glib/glib-basic-types.html#GBOOLEAN
173
>gboolean</A> terminate,
174
CORBA_Environment *ev);
176
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-PRINTF"
177
>bonobo_stream_client_printf</A
178
> (const Bonobo_Stream stream,
180
HREF=../glib/glib-basic-types.html#GBOOLEAN
181
>gboolean</A> terminate,
182
CORBA_Environment *ev,
186
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-READ-STRING"
187
>bonobo_stream_client_read_string</A
189
(const Bonobo_Stream stream,
191
CORBA_Environment *ev);
193
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-GET-LENGTH"
194
>bonobo_stream_client_get_length</A
195
> (const Bonobo_Stream stream,
196
CORBA_Environment *ev);</PRE
209
>These interfaces are designed to make the stream interface
210
slightly easier to use from client code. This is done 2 ways,
211
first by make the exception environments optiional, and secondly
212
by providing slightly nicer semantics.</P
221
>Example 1. Writing some simple data to a stream</B
231
CLASS="PROGRAMLISTING"
232
>bonobo_stream_client_printf (stream, TRUE, ev, "Hello World: <TT
242
It is well worth using the bonobo_stream_client_write function
243
for any potentialy large writes, since this blocks the data into
244
sensible chunks. This is important, otherwise a single transfer is
245
attempted that will cause hassles in the CORBA stubs. [ NB. ORBit
246
tries to alloca a huge chunk of memory and SEGVs ].</P
262
NAME="BONOBO-STREAM-CLIENT-WRITE"
264
>bonobo_stream_client_write ()</H3
273
CLASS="PROGRAMLISTING"
274
>void bonobo_stream_client_write (const Bonobo_Stream stream,
277
CORBA_Environment *ev);</PRE
282
>This is a helper routine to write <TT
298
>. It will continue to write bytes until a fatal error
299
occurs. It works around serious problems in ORBit's handling of
300
sequences, and makes for nicer, saner protocol usage for
301
transfering huge chunks of data.</P
305
CLASS="INFORMALTABLE"
334
> A CORBA Object reference to a Bonobo_Stream</TD
351
> the buffer to write</TD
368
> number of bytes to write</TD
385
> a CORBA environment to return status information.</TD
400
NAME="BONOBO-STREAM-CLIENT-READ"
402
>bonobo_stream_client_read ()</H3
411
CLASS="PROGRAMLISTING"
413
HREF=../glib/glib-basic-types.html#GUINT8
414
>guint8</A>* bonobo_stream_client_read (const Bonobo_Stream stream,
416
CORBA_long *length_read,
417
CORBA_Environment *ev);</PRE
422
>This is a helper routine to read <TT
433
a freshly g_ allocated buffer which is returned. Whilst this
434
routine may seem pointless; it reads the stream in small chunks
435
avoiding possibly massive alloca's inside ORBit's stub/skel code.</P
439
CLASS="INFORMALTABLE"
468
> A CORBA Object reference to a Bonobo_Stream</TD
485
> number of bytes to read or -1 for whole stream.</TD
502
> if non NULL will be set to the length read</TD
519
> a CORBA environment to return status information.</TD
534
>NULL on any sort of failure & 0 size read.</TD
549
NAME="BONOBO-STREAM-CLIENT-WRITE-STRING"
551
>bonobo_stream_client_write_string ()</H3
560
CLASS="PROGRAMLISTING"
561
>void bonobo_stream_client_write_string
562
(const Bonobo_Stream stream,
565
HREF=../glib/glib-basic-types.html#GBOOLEAN
566
>gboolean</A> terminate,
567
CORBA_Environment *ev);</PRE
572
>This is a helper routine to write the string in <TT
588
> is TRUE, a NULL character will be written out at the
589
end of the string. This function will not return until the entire
590
string has been written out, unless an exception is raised. See
592
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE"
593
>bonobo_stream_client_write</A
594
>(). Continues writing until finished
595
or a fatal exception occurs.</P
599
CLASS="INFORMALTABLE"
628
> A CORBA object reference to a Bonobo_Stream.</TD
662
> Whether or not to write the \0 at the end of the
680
> A pointer to a CORBA_Environment</TD
695
NAME="BONOBO-STREAM-CLIENT-PRINTF"
697
>bonobo_stream_client_printf ()</H3
706
CLASS="PROGRAMLISTING"
707
>void bonobo_stream_client_printf (const Bonobo_Stream stream,
709
HREF=../glib/glib-basic-types.html#GBOOLEAN
710
>gboolean</A> terminate,
711
CORBA_Environment *ev,
723
> and the arguments which follow it to produce a
724
string. Writes this string out to <TT
729
>. This function will not
730
return until the entire string is written out, unless an exception
731
is raised. See also <A
732
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE-STRING"
733
>bonobo_stream_client_write_string</A
736
HREF="libbonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE"
737
>bonobo_stream_client_write</A
742
CLASS="INFORMALTABLE"
771
> A CORBA object reference to a Bonobo_Stream.</TD
788
> Whether or not to null-terminate the string when it is
789
written out to the stream.</TD
806
> A CORBA_Environment pointer.</TD
823
> The printf format string.</TD
855
NAME="BONOBO-STREAM-CLIENT-READ-STRING"
857
>bonobo_stream_client_read_string ()</H3
866
CLASS="PROGRAMLISTING"
867
>CORBA_long bonobo_stream_client_read_string
868
(const Bonobo_Stream stream,
870
CORBA_Environment *ev);</PRE
875
>Reads a NULL-terminated string from <TT
881
newly-allocated string in <TT
890
CLASS="INFORMALTABLE"
919
> The Bonobo_Stream from which the string will be read.</TD
936
> The string pointer in which the string will be stored.</TD
953
> A pointer to a CORBA_Environment.</TD
968
> The number of bytes read, or -1 if an error occurs.
969
If an exception occurs, <TT
974
> will contain the exception.</TD
989
NAME="BONOBO-STREAM-CLIENT-GET-LENGTH"
991
>bonobo_stream_client_get_length ()</H3
1000
CLASS="PROGRAMLISTING"
1001
>CORBA_long bonobo_stream_client_get_length (const Bonobo_Stream stream,
1002
CORBA_Environment *ev);</PRE
1007
>Does the grunt work to get the length of a stream,
1008
returns -1 if the length is not available. Returns -1
1013
CLASS="INFORMALTABLE"
1059
> Exception environment</TD
1092
HREF="libbonobo-bonobo-storage.html#BONOBOSTREAM"
1099
CLEAR="all"><BR><TABLE
1111
HREF="libbonobo-bonobo-storage.html"
1116
><<< Previous Page</B
1165
HREF="libbonobo-bonobo-types.html"
1170
>Next Page >>></B
b'\\ No newline at end of file'