Sophie

Sophie

distrib > PLD > ac > amd64 > media > dist > by-pkgid > fd2761970a77896f276e13daf3a9620f > files > 115

bonobo-devel-1.0.22-7.amd64.rpm

<HTML
><HEAD
><TITLE
>BonoboPersistStream</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="BonoboPersistFile"
HREF="bonobo-bonobo-persist-file.html"><LINK
REL="NEXT"
TITLE="bonobo-stream-client"
HREF="bonobo-bonobo-stream-client.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-file.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; 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-stream-client.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
><A
NAME="BONOBO-BONOBO-PERSIST-STREAM"
>BonoboPersistStream</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN6843"
></A
><H2
>Name</H2
>BonoboPersistStream&nbsp;--&nbsp;Interface for anything that can save / load itself from a Bonobo stream.</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN6846"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;

struct      <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAM-STRUCT"
>BonoboPersistStream</A
>;
void        (<A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>*BonoboPersistStreamIOFn</A
>)      (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             const <GTKDOCLINK
HREF="BONOBO-STREAM"
>Bonobo_Stream</GTKDOCLINK
> stream,
                                             <GTKDOCLINK
HREF="BONOBO-PERSIST-CONTENTTYPE"
>Bonobo_Persist_ContentType</GTKDOCLINK
> type,
                                             void *closure,
                                             <GTKDOCLINK
HREF="CORBA-ENVIRONMENT"
>CORBA_Environment</GTKDOCLINK
> *ev);
<GTKDOCLINK
HREF="CORBA-LONG"
>CORBA_long</GTKDOCLINK
>  (<A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMMAXFN"
>*BonoboPersistStreamMaxFn</A
>)     (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             void *closure,
                                             <GTKDOCLINK
HREF="CORBA-ENVIRONMENT"
>CORBA_Environment</GTKDOCLINK
> *ev);
<GTKDOCLINK
HREF="BONOBO-PERSIST-CONTENTTYPELIST"
>Bonobo_Persist_ContentTypeList</GTKDOCLINK
>* (<A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMTYPESFN"
>*BonoboPersistStreamTypesFn</A
>)
                                            (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             void *closure,
                                             <GTKDOCLINK
HREF="CORBA-ENVIRONMENT"
>CORBA_Environment</GTKDOCLINK
> *ev);
typedef     <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMCLASS"
>BonoboPersistStreamClass</A
>;
void        <A
HREF="bonobo-bonobo-persist-stream.html#BONOBO-PERSIST-STREAM-SET-DIRTY"
>bonobo_persist_stream_set_dirty</A
> (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             <GTKDOCLINK
HREF="GBOOLEAN"
>gboolean</GTKDOCLINK
> dirty);
<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
>* <A
HREF="bonobo-bonobo-persist-stream.html#BONOBO-PERSIST-STREAM-NEW"
>bonobo_persist_stream_new</A
>
                                            (<A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>BonoboPersistStreamIOFn</A
> load_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>BonoboPersistStreamIOFn</A
> save_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMMAXFN"
>BonoboPersistStreamMaxFn</A
> max_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMTYPESFN"
>BonoboPersistStreamTypesFn</A
> types_fn,
                                             void *closure);
<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
>* <A
HREF="bonobo-bonobo-persist-stream.html#BONOBO-PERSIST-STREAM-CONSTRUCT"
>bonobo_persist_stream_construct</A
>
                                            (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>BonoboPersistStreamIOFn</A
> load_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>BonoboPersistStreamIOFn</A
> save_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMMAXFN"
>BonoboPersistStreamMaxFn</A
> max_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMTYPESFN"
>BonoboPersistStreamTypesFn</A
> types_fn,
                                             void *closure);&#13;</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN6880"
></A
><H2
>Object Hierarchy</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;  <GTKDOCLINK
HREF="GTKOBJECT"
>GtkObject</GTKDOCLINK
>
   +----<A
HREF="bonobo-bonobo-object.html#BONOBOOBJECT"
>BonoboObject</A
>
         +----<GTKDOCLINK
HREF="BONOBOXOBJECT"
>BonoboXObject</GTKDOCLINK
>
               +----<A
HREF="bonobo-bonobo-persist.html#BONOBOPERSIST"
>BonoboPersist</A
>
                     +----BonoboPersistStream</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN6887"
></A
><H2
>Description</H2
><P
>The PersistStream interface is the interface to use for all new
components that are able to load and save themselves to a stream.
It should be associated with any <GTKDOCLINK
HREF="BONOBOEMBEDDABLE"
>BonoboEmbeddable</GTKDOCLINK
> for use by the
container in creating a compound document.</P
><P
>This interface works by connecting callbacks to the methods, in
a somewhat deprecated fashion, it is probably better nowadays to
simply sub-class the BonoboXObject and override the epv methods.
Either way, after all the caveats here is an example use:</P
><P
>  <DIV
CLASS="EXAMPLE"
><A
NAME="AEN6893"
></A
><P
><B
>Example 1. Implementing the PersistStream callbacks</B
></P
><TABLE
BORDER="0"
BGCOLOR="#D8F8D8"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>static void
load_from_stream (BonoboPersistStream        *ps,
                  const Bonobo_Stream         stream,
                  Bonobo_Persist_ContentType  type,
                  void                       *closure,
                  CORBA_Environment          *ev)
{
	EogImageData *image_data = closure;

	g_warning ("Load content from stream of type '<TT
CLASS="LITERAL"
>s</TT
>'", type);
}

static gint
save_to_stream (BonoboPersistStream        *ps,
                const Bonobo_Stream         stream,
                Bonobo_Persist_ContentType  type,
                void                       *closure,
                CORBA_Environment          *ev)
{
	EogImageData *image_data = closure;

	g_warning ("Save content to stream with type '<TT
CLASS="LITERAL"
>s</TT
>'", type);
}

static Bonobo_Persist_ContentTypeList *
get_supported_types (BonoboPersistStream *ps,
                     void                *closure,
                     CORBA_Environment   *ev)
{
	return bonobo_persist_generate_content_types (
		2, "text/plain", "text/html");
}
    </PRE
></TD
></TR
></TABLE
></DIV
>
Having implemented the callbacks we then have to register them
and aggregate the interface to our object:
  <DIV
CLASS="EXAMPLE"
><A
NAME="AEN6898"
></A
><P
><B
>Example 2. Aggregating a new PersistStream</B
></P
><TABLE
BORDER="0"
BGCOLOR="#D8F8D8"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>EogImageData *
eog_image_data_construct (EogImageData *image_data)
{
	BonoboObject        *retval;
	BonoboPersistStream *ps;

	ps = bonobo_persist_stream_new (
		load_from_stream, save_to_stream,
		get_supported_types, NULL,
		image_data);

	if (ps == NULL) {
		bonobo_object_unref (BONOBO_OBJECT (image_data));
		return NULL;
	}

	bonobo_object_add_interface (BONOBO_OBJECT (image_data),
				     BONOBO_OBJECT (ps));

	return image_data;
}
    </PRE
></TD
></TR
></TABLE
></DIV
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN6901"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN6903"
></A
><H3
><A
NAME="BONOBOPERSISTSTREAM-STRUCT"
></A
>struct BonoboPersistStream</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct BonoboPersistStream;</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN6908"
></A
><H3
><A
NAME="BONOBOPERSISTSTREAMIOFN"
></A
>BonoboPersistStreamIOFn ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        (*BonoboPersistStreamIOFn)      (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             const <GTKDOCLINK
HREF="BONOBO-STREAM"
>Bonobo_Stream</GTKDOCLINK
> stream,
                                             <GTKDOCLINK
HREF="BONOBO-PERSIST-CONTENTTYPE"
>Bonobo_Persist_ContentType</GTKDOCLINK
> type,
                                             void *closure,
                                             <GTKDOCLINK
HREF="CORBA-ENVIRONMENT"
>CORBA_Environment</GTKDOCLINK
> *ev);</PRE
></TD
></TR
></TABLE
><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="AEN6918"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>ps</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6923"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>stream</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6928"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>type</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6933"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>closure</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6938"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>ev</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
>&#13;</P
></TD
></TR
></TBODY
></TABLE
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN6943"
></A
><H3
><A
NAME="BONOBOPERSISTSTREAMMAXFN"
></A
>BonoboPersistStreamMaxFn ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><GTKDOCLINK
HREF="CORBA-LONG"
>CORBA_long</GTKDOCLINK
>  (*BonoboPersistStreamMaxFn)     (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             void *closure,
                                             <GTKDOCLINK
HREF="CORBA-ENVIRONMENT"
>CORBA_Environment</GTKDOCLINK
> *ev);</PRE
></TD
></TR
></TABLE
><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="AEN6952"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>ps</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6957"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>closure</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6962"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>ev</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6967"><SPAN
STYLE="white-space: nowrap"
><I
CLASS="EMPHASIS"
>Returns</I
> :</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
>&#13;</P
></TD
></TR
></TBODY
></TABLE
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN6972"
></A
><H3
><A
NAME="BONOBOPERSISTSTREAMTYPESFN"
></A
>BonoboPersistStreamTypesFn ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><GTKDOCLINK
HREF="BONOBO-PERSIST-CONTENTTYPELIST"
>Bonobo_Persist_ContentTypeList</GTKDOCLINK
>* (*BonoboPersistStreamTypesFn)
                                            (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             void *closure,
                                             <GTKDOCLINK
HREF="CORBA-ENVIRONMENT"
>CORBA_Environment</GTKDOCLINK
> *ev);</PRE
></TD
></TR
></TABLE
><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="AEN6981"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>ps</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6986"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>closure</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6991"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>ev</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN6996"><SPAN
STYLE="white-space: nowrap"
><I
CLASS="EMPHASIS"
>Returns</I
> :</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
>&#13;</P
></TD
></TR
></TBODY
></TABLE
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7001"
></A
><H3
><A
NAME="BONOBOPERSISTSTREAMCLASS"
></A
>BonoboPersistStreamClass</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>typedef struct {
	BonoboPersistClass parent_class;

	POA_Bonobo_PersistStream__epv epv;

	/* methods */
	void       (*load)         (BonoboPersistStream        *ps,
				    Bonobo_Stream              stream,
				    Bonobo_Persist_ContentType type,
				    CORBA_Environment          *ev);
	void       (*save)         (BonoboPersistStream        *ps,
				    Bonobo_Stream              stream,
				    Bonobo_Persist_ContentType type,
				    CORBA_Environment          *ev);
	CORBA_long (*get_size_max) (BonoboPersistStream *ps,
				    CORBA_Environment   *ev);
	Bonobo_Persist_ContentTypeList * (*get_content_types) (BonoboPersistStream *ps,
							       CORBA_Environment   *ev);

} BonoboPersistStreamClass;</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7006"
></A
><H3
><A
NAME="BONOBO-PERSIST-STREAM-SET-DIRTY"
></A
>bonobo_persist_stream_set_dirty ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        bonobo_persist_stream_set_dirty (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             <GTKDOCLINK
HREF="GBOOLEAN"
>gboolean</GTKDOCLINK
> dirty);</PRE
></TD
></TR
></TABLE
><P
>This routine sets the dirty bit for the PersistStream object.</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="AEN7015"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>ps</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> A BonoboPersistStream object</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7020"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>dirty</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> A boolean value representing whether the object is dirty or not</P
></TD
></TR
></TBODY
></TABLE
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7025"
></A
><H3
><A
NAME="BONOBO-PERSIST-STREAM-NEW"
></A
>bonobo_persist_stream_new ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
>* bonobo_persist_stream_new
                                            (<A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>BonoboPersistStreamIOFn</A
> load_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>BonoboPersistStreamIOFn</A
> save_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMMAXFN"
>BonoboPersistStreamMaxFn</A
> max_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMTYPESFN"
>BonoboPersistStreamTypesFn</A
> types_fn,
                                             void *closure);</PRE
></TD
></TR
></TABLE
><P
>Creates a new BonoboPersistStream object. The various operations
for the object are performed by the provided callback functions,
which are passed <TT
CLASS="PARAMETER"
><I
>closure</I
></TT
> when they are invoked. If any callback is
<TT
CLASS="LITERAL"
>NULL</TT
>, the corresponding operation is performed by the class load
and save routines.</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="AEN7039"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>load_fn</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> Loading routine</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7044"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>save_fn</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> Saving routine</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7049"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>max_fn</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> get_max_size routine</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7054"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>types_fn</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> get_content_types routine</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7059"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>closure</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> Data passed to IO routines.</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7064"><SPAN
STYLE="white-space: nowrap"
><I
CLASS="EMPHASIS"
>Returns</I
> :</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> the newly-created BonoboPersistStream object.</P
></TD
></TR
></TBODY
></TABLE
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7069"
></A
><H3
><A
NAME="BONOBO-PERSIST-STREAM-CONSTRUCT"
></A
>bonobo_persist_stream_construct ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
>* bonobo_persist_stream_construct
                                            (<GTKDOCLINK
HREF="BONOBOPERSISTSTREAM"
>BonoboPersistStream</GTKDOCLINK
> *ps,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>BonoboPersistStreamIOFn</A
> load_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMIOFN"
>BonoboPersistStreamIOFn</A
> save_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMMAXFN"
>BonoboPersistStreamMaxFn</A
> max_fn,
                                             <A
HREF="bonobo-bonobo-persist-stream.html#BONOBOPERSISTSTREAMTYPESFN"
>BonoboPersistStreamTypesFn</A
> types_fn,
                                             void *closure);</PRE
></TD
></TR
></TABLE
><P
>Initializes the BonoboPersistStream object.  The load and save
operations for the object are performed by the provided <TT
CLASS="PARAMETER"
><I
>load_fn</I
></TT
>
and <TT
CLASS="PARAMETER"
><I
>save_fn</I
></TT
> callback functions, which are passed <TT
CLASS="PARAMETER"
><I
>closure</I
></TT
> when
they are invoked.  If either <TT
CLASS="PARAMETER"
><I
>load_fn</I
></TT
> or <TT
CLASS="PARAMETER"
><I
>save_fn</I
></TT
> is <TT
CLASS="LITERAL"
>NULL</TT
>, the
corresponding operation is performed by the class load and save
routines.</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="AEN7088"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>ps</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> A BonoboPersistStream object</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7093"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>load_fn</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> Loading routine</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7098"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>save_fn</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> Saving routine</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7103"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>max_fn</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7108"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>types_fn</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
></P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7113"><SPAN
STYLE="white-space: nowrap"
><TT
CLASS="PARAMETER"
><I
>closure</I
></TT
>&nbsp;:</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> Data passed to IO routines.</P
></TD
></TR
><TR
><TD
ALIGN="RIGHT"
VALIGN="TOP"
WIDTH="20%"
><A
NAME="AEN7118"><SPAN
STYLE="white-space: nowrap"
><I
CLASS="EMPHASIS"
>Returns</I
> :</SPAN
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="80%"
><P
> The initialized BonoboPersistStream object.</P
></TD
></TR
></TBODY
></TABLE
></DIV
></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-file.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; 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-stream-client.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="left"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>BonoboPersistFile</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>bonobo-stream-client</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>