404

[ Avaa Bypassed ]




Upload:

Command:

botdev@52.14.78.86: ~ $
/*
 * bonobo-persist.idl: Bonobo::Persist interfaces
 *
 * Copyright (C) 1999, 2000  Helix Code, Inc.
 *
 * Authors:
 *    Miguel de Icaza (miguel@gnu.org)
 *    Dan Winship     (danw@helixcode.com)
 */

#ifndef BONOBO_PERSIST_IDL
#define BONOBO_PERSIST_IDL

#include "Bonobo_Unknown.idl"
#include "Bonobo_Storage.idl"
#include "Bonobo_Exception.idl"

module Bonobo {

	interface Persist : Unknown {
		enum Status {
			SAVE_OK,
			SAVE_CANCEL,
			SAVE_FAILED
		};

		exception WrongDataType {};
		exception FileNotFound {};

		typedef string                ContentType;
		typedef sequence<ContentType> ContentTypeList;
		
		/**
		 * getContentTypes:
		 *
		 *  Gets a list of supported mime types that this
		 * persistor can save its data in. The default /
		 * preferred type being the first element.
		 */
		ContentTypeList getContentTypes ();

		typedef string                IID;
		
		/**
		 * getIId:
		 *
		 * Get the IID necessary to recreate the object whose
		 * internal state this interface represents
		 */
		IID getIId ();

		/**
		 * isDirty:
		 * 
		 * Indicates if a save is necessary.
		 */
		boolean isDirty ();
	
		void unImplemented1 ();
		void unImplemented2 ();
	};
	
	/*
	 * The PersistFile interface is somewhat mis-named it
	 * should be PersistURI.
	 *
	 * This allows applications to load and save documents
	 * via the Gnome VFS.
	 */
	interface PersistFile : Persist {

	        exception NoCurrentName {
			string extension;
		};

		/**
		 * load:
		 * @uri: URI to load from
		 * 
		 * Loads the document object from the file
		 * pointed in by @path
		 */
		void load (in string uri)
			raises (IOError, NotSupported,
				WrongDataType, FileNotFound);

		/**
		 * save:
		 * @uri: the URI to save to
		 * saves the document object to the file 
		 * pointed in by @path
		 */
		void save (in string uri)
			raises (IOError, NotSupported);
	
		/**
		 * getCurrentFile:
		 * 
		 * Returns the URI of the current file. 
		 */
		string getCurrentFile ()
			raises (NoCurrentName);

		void unImplemented3 ();
		void unImplemented4 ();
	};

	/*
	 * PersistStorage is implemented by BonoboObjects.
	 * 
	 * The methods are used by Bonobo and the container
	 * applications to manipulate the storage of a componet
	 */
	interface PersistStorage : Persist {
		
		/**
		 * load:
		 * @storage: The storage to load the state from
		 *
		 * The bonobo_object should load its state from the
		 * @storage provided
		 */
		void load (in Bonobo::Storage storage)
			raises (IOError, NotSupported,
				WrongDataType);

		/**
		 * save:
		 * @storage: The storage in which to save the state
		 * of the bonobo_object
		 * @same_as_loaded: if TRUE, this means the object
		 * is being saved to the same source used to load the object
		 *
		 * BonoboObjects should save their sate in the @storage
		 */
		void save (in Bonobo::Storage storage,
			   in boolean same_as_loaded)
			raises (IOError, NotSupported);
	};
	
	/*
	 * This interface is used by items which only need to store 
	 * information in a Stream ( monikers are the primary
	 * users of this ).  
	 *
	 * Unlike PersistStorage, the Stream passed is only valid
	 * during these calls (ie, you should not incref these
	 * and used them after this).
	 */
	interface PersistStream : Persist {
		
		/**
		 * load:
		 * @stream: Where to load the state from
		 * @type: the MIME content type of the data, or ""
		 * if it is unknown.
		 *
		 * Loads the status of the object from @stream
		 */
		void load (in Bonobo::Stream stream, in ContentType type)
			raises (IOError, NotSupported,
				WrongDataType);

		/**
		 * save:
		 * @stream: Where to save the state to.
		 * @type: the MIME content type to save the data in,
		 * or "" if any type is acceptable.
		 *
		 * If no exception was thrown the data in the stream has
		 * the requested content type; if no type was requested
		 * the first entry from getContentTypes is returned.
		 * Hence no return value is needed.
		 * 
		 * Saves the state of the object to the @stream
		 */
		void save (in Bonobo::Stream stream, in ContentType type)
			raises (IOError, NotSupported,
				WrongDataType);

		void unImplemented3 ();
		void unImplemented4 ();
	};
};

#endif /* BONOBO_PERSIST_IDL */

Filemanager

Name Type Size Permission Actions
Bonobo.idl File 1.12 KB 0644
Bonobo_Application.idl File 1.38 KB 0644
Bonobo_Canvas.idl File 3.95 KB 0644
Bonobo_Clipboard.idl File 2.02 KB 0644
Bonobo_Context.idl File 2.86 KB 0644
Bonobo_Control.idl File 4.97 KB 0644
Bonobo_Embeddable.idl File 1.82 KB 0644
Bonobo_Exception.idl File 369 B 0644
Bonobo_Gdk.idl File 2.14 KB 0644
Bonobo_ItemContainer.idl File 1.22 KB 0644
Bonobo_Listener.idl File 1.91 KB 0644
Bonobo_Moniker.idl File 2.87 KB 0644
Bonobo_Persist.idl File 4.12 KB 0644
Bonobo_Print.idl File 1013 B 0644
Bonobo_Property.idl File 4.57 KB 0644
Bonobo_Sample_Echo.idl File 219 B 0644
Bonobo_Storage.idl File 5.65 KB 0644
Bonobo_UI.idl File 3.09 KB 0644
Bonobo_Zoomable.idl File 3.67 KB 0644