aboutsummaryrefslogtreecommitdiffstats
path: root/shell/Evolution-Shell.idl
blob: 86d54741c9478e0fc38989c4cfa9ee1c06586853 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Interface for the Evolution shell.
 *
 * Authors:
 *   Ettore Perazzoli <ettore@ximian.com>
 *
 * Copyright (C) 2000, 2001 Ximian, Inc.
 */

#include <Bonobo.idl>

module GNOME {
module Evolution {
    interface ShellComponent;

    interface FolderSelectionListener;

    interface Shell : Bonobo::Unknown {
        exception NotFound {};
        exception UnsupportedSchema {};
        exception InvalidURI {};
        exception InternalError {};
        exception Busy {};

        typedef sequence<string> FolderTypeNameList;

        /**
         * getComponentByType:
         * @type: name of a valid folder type
         *
         * Get the shell component associated with a specific folder type.
         *
         * Return value: the Evolution::ShellComponent interface for the component that
         * handles @type.
         */
        ShellComponent getComponentByType (in string type)
            raises (NotFound);

        /**
         * createNewView:
         * @uri: URI for the view to open
         *
         * Return value: the new view.
         */
        ShellView createNewView (in string uri)
            raises (NotFound, UnsupportedSchema, InvalidURI, InternalError);

        /**
         * handleURI:
         * @uri: URI to handle
         *
         * This handles the specified URI.  It is different from
         * `::createNewView' as it doesn't necessarily imply creating a
         * new ShellView.  (For example, a `mailto:' URI will invoke
         * the message composer.)
         */
        void handleURI (in string uri)
            raises (NotFound, UnsupportedSchema, InvalidURI, InternalError);

        /**
         * selectUserFolder:
         * @listener: a listener interface to report the answer of the user.
         * @title: title for the folder selector dialog
         * @default_folder: physical or `evolution:' URI for the folder that must be
         * selected by default, when the dialog is popped up
         * @possible_types: list of the names of the types of folders that are allowed
         *
         * Pop up a folder selection dialog from which the user can select a folder.
         * Initially, the @default_folder is selected.  The user can also create a new
         * folder by using the "New..." button.  The dialog only lets the user choose
         * a folder whose type is listed in @possible_types.
         */
        void selectUserFolder (in FolderSelectionListener listener,
                     in string title,
                     in string default_folder,
                     in FolderTypeNameList possible_types)
            raises (Busy);

        /**
         * getLocalStorage:
         *
         * Get the interface to the local storage.
         *
         * FIXME: Probably we just want to be able to request this to
         * the StorageRegistry.  This is an ugly kludge.
         *
         * Return value: the `Evolution::LocalStorage' interface for
         * the local storage.  */
        Storage getLocalStorage ();

        /**
         * createStorageSetView:
         *
         * Create a control for the storage set view.  This control
         * will also implement the `Evolution::StorageSetView' interface.
         *
         * Return value: the newly created control.
         */
        Bonobo::Control createStorageSetView ();
    };

    interface FolderSelectionListener {
        void notifySelected (in string uri, in string physical_uri);
        void notifyCanceled ();
    };
};
};