[Evolution] Shell folder browsing

The shell will need a tree-view of all the items available for viewing; this
includes mail folders, calendar folders, etc. Now, because we may have
multiple clients (each of which may want to play with the tree), the shell
shouldn't look directly into the filesystem to fill out this tree, but
should rather talk to the wombat to do so. So we need a way for clients

* surf the list of folders
* get notifications when the list changes
* fire up a bonobo control that corresponds to a folder
* fire up a data object that represents the folder's data

To that end, I've put together a preliminary interface for the manipulation
of folders, as could be exposed by the Wombat process.

module Evolution {

        interface Folder {
                exception WrongFolderType {};
            exception WrongFolderDomain {};
            exception NoSuchFolder {};

                /* human-readable name, like "Inbox" */
                attribute string name;

                attribute sequence<Folder> subfolders;

                /* a folder must be associated with something
             * that can view it, and something that can
             * manipulate its internals */
                void get_goad_ids (out string data_source_id,
                                       out string control_id);

                /* get a bonobo control for this view; a client won't
             * use the goad_id gathered in the above function, b/c
             * only the wombat knows how to do that, by surfing
             * the physical evolution directory structure */
                Bonobo::Control get_control();

                /* You must know what interface to
                 * query_interface() for  once you get
             * a data source! */
                Bonobo::Unknown get_data_source();

                Folder AddNewSubfolder (in string data_source_id,
                                              in string control_id,
                                              in string viewable_name)
                        raises WrongFolderType;
                void MoveSubfolderHere (in Folder subfolder)
                        raises WrongFolderDomain;
                DeleteSubfolder (in Folder subfolder)
                        raises NoSuchFolder;

        interface Wombat {
                Folder get_root_folder();
                void add_folder_listener (FolderListener listener);
                void remove_folder_listener (FolderListener listener);

      /* a folder's subfolders may change, so
       * the shell will need notification */
        interface FolderListener {
                void reload(Folder f);

Suggestions, comments and criticism welcome.


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