monikers




How are we going to implement the folowing ?

Ok, one GtkObject for LinkServer, LinkClient.
One GtkObject for Moniker -> base abstract class.
One GtkObject for each FileMoniker and ItemMoniker
They inherit the Moniker class and implement it.

The idea is that we have: 

File <---- Item <---- Item <---- Item

The implementation will implicitely rely
on one FileMoniker per Moniker.
Also, I would say that FileMonikers should be 
implemented using gnome-vfs. During the binding phase,
FileMonikers should load the file if necessary using 
gnome-vfs. 
However, this is a cheap hack: applications should be 
able to support http://www.advogato.org/person/mathieu 
by using gnome-vfs themselves.

regards,
Mathieu 


module Bonobo {

	/**
	 * This interface is inherited by the MonikerFactory
	 * object and by the LinkServer Object.
	 */
	interface MonikerStringParser : Unknown {
		/**
		 * parse_moniker_string:
		 *
		 * Returns a moniker from the string representation
		 * This is probably one of the most important method 
		 * here...
		 */
		Moniker parse_moniker_string (in string moniker_string,
					     out short moniker_string_bytes_parsed);
	}

	/**
	 * This interface must implemented by the embeddables 
	 * which can be embedded as links and which want to 
	 * support the Complex Linking stuff.
	 */
	interface LinkServer : MonikerStringParser {
		
		/**
		 * get_object:
		 * @item_name: Item name to bind to
		 * @only_if_exists: if TRUE, only bind if this object currently exists
		 * otherwise, it will try to create the server for it.
		 */
		Unknown get_object (in string item_name, in boolean only_if_exists)
			raises (SyntaxError, NotFound);
	
	}


	/**
	 * This interface should be implemented by containers 
	 * which can embedd linked embeddables.
	 * It would allow us to create a "Document Links Dialog"
	 * like in OLE and OpenDoc.
	 * Parts of this interface were shamelessly stolen from
	 * the BindContext interface of bonobo-moniker.idl. 
	 */
	interface LinkClient : Unknown {

		typedef sequence<Moniker> MonikerList;

		/**
		 * returns the list of all the links which
		 * the container holds
		 */
		MonikerList get_links (void);
	}


	

	/**
	 * This interface is created by calling 
	 * some API magic function.
	 */
	interface Moniker : Object {
		exception InterfaceNotFound {
			string interface_name;
		};
	       
		exception MissingInterface {
			string interface_name;
			string object_name;
		};

		/**
		 * bind_to_object:
		 * @requested_interface: which interface we want in the end
		 *
		 * Binds a moniker. Once the service has been registered, it
		 * will attempt to get the @requester_interface
		 */
		Object bind_to_object (in string requested_interface)
			raises (InterfaceNotFound, TimeOut, MissingInterface);

		/**
		 * get_relative_moniker:
		 */
		Moniker get_relative_moniker (void);

		/**
		 * get_absolute_moniker:
		 */
		Moniker get_absolute_moniker (void);

		/**
		 * get_display_name:
		 * 
		 * Returns a representation of the Moniker
		 */
		string get_display_name (void);					    
	};

	interface FileMoniker : Moniker {

		  String get_file_name (void);

	}

	interface ItemMoniker : Moniker {

		  String get_item_moniker_string (void);

	}
};
-- 
Mathieu Lacage 
Snailmail: ch 224, 212 Rue de Tolbiac 75013 Paris
email: mathieu@advogato.org
url: http://www.stud.enst.fr/~lacage



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]