<HTML ><HEAD ><TITLE >bonobo-stream-client</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.64 "><LINK REL="HOME" TITLE="Bonobo API Reference Manual" HREF="book1.html"><LINK REL="UP" TITLE="Storage and Persistance" HREF="bonobo-storage.html"><LINK REL="PREVIOUS" TITLE="BonoboPersistStream" HREF="bonobo-bonobo-persist-stream.html"><LINK REL="NEXT" TITLE="bonobo-storage-plugin" HREF="bonobo-bonobo-storage-plugin.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TH COLSPAN="4" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="5" >Bonobo API Reference Manual</FONT ></TH ></TR ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="bonobo-bonobo-persist-stream.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="book1.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="bonobo-storage.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="bonobo-bonobo-storage-plugin.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ></TABLE ></DIV ><H1 ><A NAME="BONOBO-BONOBO-STREAM-CLIENT" >bonobo-stream-client</A ></H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN7128" ></A ><H2 >Name</H2 >bonobo-stream-client -- Simplified client wrapper functions for the Stream interface</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN7131" ></A ><H2 >Synopsis</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > <GTKDOCLINK HREF="GUINT8" >guint8</GTKDOCLINK >* <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-READ" >bonobo_stream_client_read</A > (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, const <GTKDOCLINK HREF="SIZE-T" >size_t</GTKDOCLINK > size, <GTKDOCLINK HREF="CORBA-LONG" >CORBA_long</GTKDOCLINK > *length_read, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev); void <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE" >bonobo_stream_client_write</A > (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, const void *buffer, const <GTKDOCLINK HREF="SIZE-T" >size_t</GTKDOCLINK > size, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev); void <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE-STRING" >bonobo_stream_client_write_string</A > (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, const char *str, const <GTKDOCLINK HREF="GBOOLEAN" >gboolean</GTKDOCLINK > terminate, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev); void <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-PRINTF" >bonobo_stream_client_printf</A > (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, const <GTKDOCLINK HREF="GBOOLEAN" >gboolean</GTKDOCLINK > terminate, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev, const char *fmt, ...); <GTKDOCLINK HREF="CORBA-LONG" >CORBA_long</GTKDOCLINK > <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-READ-STRING" >bonobo_stream_client_read_string</A > (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, char **str, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev); <GTKDOCLINK HREF="CORBA-LONG" >CORBA_long</GTKDOCLINK > <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-GET-LENGTH" >bonobo_stream_client_get_length</A > (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev); </PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN7160" ></A ><H2 >Description</H2 ><P >These interfaces are designed to make the stream interface slightly easier to use from client code. This is done 2 ways, first by make the exception environments optiional, and secondly by providing slightly nicer semantics.</P ><P > <DIV CLASS="EXAMPLE" ><A NAME="AEN7164" ></A ><P ><B >Example 1. Writing some simple data to a stream</B ></P ><TABLE BORDER="0" BGCOLOR="#D8F8D8" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >bonobo_stream_client_printf (stream, TRUE, ev, "Hello World: <TT CLASS="LITERAL" >d</TT >", 5); </PRE ></TD ></TR ></TABLE ></DIV > It is well worth using the bonobo_stream_client_write function for any potentialy large writes, since this blocks the data into sensible chunks. This is important, otherwise a single transfer is attempted that will cause hassles in the CORBA stubs. [ NB. ORBit tries to alloca a huge chunk of memory and SEGVs ].</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN7168" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN7170" ></A ><H3 ><A NAME="BONOBO-STREAM-CLIENT-READ" ></A >bonobo_stream_client_read ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><GTKDOCLINK HREF="GUINT8" >guint8</GTKDOCLINK >* bonobo_stream_client_read (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, const <GTKDOCLINK HREF="SIZE-T" >size_t</GTKDOCLINK > size, <GTKDOCLINK HREF="CORBA-LONG" >CORBA_long</GTKDOCLINK > *length_read, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev);</PRE ></TD ></TR ></TABLE ><P >This is a helper routine to read <TT CLASS="PARAMETER" ><I >size</I ></TT > bytes from the <TT CLASS="PARAMETER" ><I >stream</I ></TT > into a freshly g_ allocated buffer which is returned. Whilst this routine may seem pointless; it reads the stream in small chunks avoiding possibly massive alloca's inside ORBit's stub/skel code.</P ><P ></P ><P ></P ><TABLE CLASS="VARIABLELIST" BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="100%" BGCOLOR="#FFD0D0" ><TBODY ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7184"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >stream</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > A CORBA Object reference to a Bonobo_Stream</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7189"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >size</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > number of bytes to read or -1 for whole stream.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7194"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >length_read</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > if non NULL will be set to the length read</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7199"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >ev</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > a CORBA environment to return status information.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7204"><SPAN STYLE="white-space: nowrap" ><I CLASS="EMPHASIS" >Returns</I > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P >NULL on any sort of failure & 0 size read.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7209" ></A ><H3 ><A NAME="BONOBO-STREAM-CLIENT-WRITE" ></A >bonobo_stream_client_write ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void bonobo_stream_client_write (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, const void *buffer, const <GTKDOCLINK HREF="SIZE-T" >size_t</GTKDOCLINK > size, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev);</PRE ></TD ></TR ></TABLE ><P >This is a helper routine to write <TT CLASS="PARAMETER" ><I >size</I ></TT > bytes from <TT CLASS="PARAMETER" ><I >buffer</I ></TT > to the <TT CLASS="PARAMETER" ><I >stream</I ></TT >. It will continue to write bytes until a fatal error occurs. It works around serious problems in ORBit's handling of sequences, and makes for nicer, saner protocol usage for transfering huge chunks of data.</P ><P ></P ><P ></P ><TABLE CLASS="VARIABLELIST" BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="100%" BGCOLOR="#FFD0D0" ><TBODY ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7222"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >stream</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > A CORBA Object reference to a Bonobo_Stream</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7227"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >buffer</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > the buffer to write</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7232"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >size</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > number of bytes to write</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7237"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >ev</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > a CORBA environment to return status information.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7242" ></A ><H3 ><A NAME="BONOBO-STREAM-CLIENT-WRITE-STRING" ></A >bonobo_stream_client_write_string ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void bonobo_stream_client_write_string (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, const char *str, const <GTKDOCLINK HREF="GBOOLEAN" >gboolean</GTKDOCLINK > terminate, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev);</PRE ></TD ></TR ></TABLE ><P >This is a helper routine to write the string in <TT CLASS="PARAMETER" ><I >str</I ></TT > to <TT CLASS="PARAMETER" ><I >stream</I ></TT >. If <TT CLASS="PARAMETER" ><I >terminate</I ></TT > is TRUE, a NULL character will be written out at the end of the string. This function will not return until the entire string has been written out, unless an exception is raised. See also <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE" >bonobo_stream_client_write</A >(). Continues writing until finished or a fatal exception occurs.</P ><P ></P ><P ></P ><TABLE CLASS="VARIABLELIST" BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="100%" BGCOLOR="#FFD0D0" ><TBODY ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7256"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >stream</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > A CORBA object reference to a <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK >.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7262"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >str</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > A string.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7267"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >terminate</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > Whether or not to write the \0 at the end of the string.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7272"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >ev</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > A pointer to a <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK ></P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7278" ></A ><H3 ><A NAME="BONOBO-STREAM-CLIENT-PRINTF" ></A >bonobo_stream_client_printf ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void bonobo_stream_client_printf (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, const <GTKDOCLINK HREF="GBOOLEAN" >gboolean</GTKDOCLINK > terminate, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev, const char *fmt, ...);</PRE ></TD ></TR ></TABLE ><P >Processes <TT CLASS="PARAMETER" ><I >fmt</I ></TT > and the arguments which follow it to produce a string. Writes this string out to <TT CLASS="PARAMETER" ><I >stream</I ></TT >. This function will not return until the entire string is written out, unless an exception is raised. See also <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE-STRING" >bonobo_stream_client_write_string</A >() and <A HREF="bonobo-bonobo-stream-client.html#BONOBO-STREAM-CLIENT-WRITE" >bonobo_stream_client_write</A >().</P ><P ></P ><P ></P ><TABLE CLASS="VARIABLELIST" BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="100%" BGCOLOR="#FFD0D0" ><TBODY ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7292"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >stream</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > A CORBA object reference to a <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK >.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7298"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >terminate</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > Whether or not to null-terminate the string when it is written out to the stream.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7303"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >ev</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > A CORBA_Environment pointer.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7308"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >fmt</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > The printf format string.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7313"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >...</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7318" ></A ><H3 ><A NAME="BONOBO-STREAM-CLIENT-READ-STRING" ></A >bonobo_stream_client_read_string ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><GTKDOCLINK HREF="CORBA-LONG" >CORBA_long</GTKDOCLINK > bonobo_stream_client_read_string (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, char **str, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev);</PRE ></TD ></TR ></TABLE ><P >Reads a NULL-terminated string from <TT CLASS="PARAMETER" ><I >stream</I ></TT > and stores it in a newly-allocated string in <TT CLASS="PARAMETER" ><I >str</I ></TT >.</P ><P ></P ><P ></P ><TABLE CLASS="VARIABLELIST" BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="100%" BGCOLOR="#FFD0D0" ><TBODY ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7330"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >stream</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > The <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > from which the string will be read.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7336"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >str</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > The string pointer in which the string will be stored.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7341"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >ev</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > A pointer to a <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK >.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7347"><SPAN STYLE="white-space: nowrap" ><I CLASS="EMPHASIS" >Returns</I > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > The number of bytes read, or -1 if an error occurs. If an exception occurs, <TT CLASS="PARAMETER" ><I >ev</I ></TT > will contain the exception.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7353" ></A ><H3 ><A NAME="BONOBO-STREAM-CLIENT-GET-LENGTH" ></A >bonobo_stream_client_get_length ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><GTKDOCLINK HREF="CORBA-LONG" >CORBA_long</GTKDOCLINK > bonobo_stream_client_get_length (const <GTKDOCLINK HREF="BONOBO-STREAM" >Bonobo_Stream</GTKDOCLINK > stream, <GTKDOCLINK HREF="CORBA-ENVIRONMENT" >CORBA_Environment</GTKDOCLINK > *ev);</PRE ></TD ></TR ></TABLE ><P >Does the grunt work to get the length of a stream, returns -1 if the length is not available. Returns -1 on exception.</P ><P ></P ><P ></P ><TABLE CLASS="VARIABLELIST" BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="100%" BGCOLOR="#FFD0D0" ><TBODY ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7363"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >stream</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > The stream.</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7368"><SPAN STYLE="white-space: nowrap" ><TT CLASS="PARAMETER" ><I >ev</I ></TT > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > Exception environment</P ></TD ></TR ><TR ><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="20%" ><A NAME="AEN7373"><SPAN STYLE="white-space: nowrap" ><I CLASS="EMPHASIS" >Returns</I > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="80%" ><P > Length or -1</P ></TD ></TR ></TBODY ></TABLE ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN7378" ></A ><H2 >See Also</H2 ><P ><A HREF="bonobo-bonobo-stream.html#BONOBOSTREAM" >BonoboStream</A ></P ></DIV ><DIV CLASS="NAVFOOTER" ><BR CLEAR="all"><BR><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="bonobo-bonobo-persist-stream.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="book1.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="bonobo-storage.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="bonobo-bonobo-storage-plugin.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ><TR ><TD COLSPAN="2" ALIGN="left" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >BonoboPersistStream</B ></FONT ></TD ><TD COLSPAN="2" ALIGN="right" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >bonobo-storage-plugin</B ></FONT ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >