aboutsummaryrefslogtreecommitdiffstats
path: root/shell/Evolution-ShellComponent.idl
blob: 101d23d4f350e50377eff36d59f96417aa4a0126 (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
109
110
111
112
113
114
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Interface for the Evolution components.
 *
 * Authors:
 *   Ettore Perazzoli <ettore@ximian.com>
 *
 * Copyright (C) 2000, 2001 Ximian, Inc.
 */

#include <Bonobo.h>

module GNOME {
module Evolution {
    interface Shell;

    struct FolderType {
        string name;
        string icon_name;

        boolean user_creatable;

        sequence<string> accepted_dnd_types;
        sequence<string> exported_dnd_types;
    };
    typedef sequence<FolderType> FolderTypeList;

    typedef string URISchema;
    typedef sequence<URISchema> URISchemaList;

    struct UserCreatableItemType {
        string id;
        string description;
        string menuDescription;
        char menuShortcut;
    };
    typedef sequence<UserCreatableItemType> UserCreatableItemTypeList;

    interface ShellComponentListener;

    interface ShellComponent : Bonobo::Unknown {
        readonly attribute FolderTypeList supported_types;
        readonly attribute URISchemaList external_uri_schemas;
        readonly attribute UserCreatableItemTypeList user_creatable_item_types;

        /* FIXME: Can we use an attribute here?  */
        exception AlreadyOwned {};

        void setOwner (in Shell shell, in string evolution_homedir)
            raises (AlreadyOwned);

        exception NotOwned {};

        void unsetOwner ()
            raises (NotOwned);

        void debug (in string log_path);

        /* FIXME: We might want more exceptions here.  */
        exception NotFound {};
        exception UnsupportedType {};
        exception UnsupportedSchema {};
        exception InternalError {};

        Bonobo::Control createView (in string physical_uri,
                        in string type)
            raises (NotFound, UnsupportedType, InternalError);

        void handleExternalURI (in string external_uri)
            raises (NotFound, UnsupportedSchema, InternalError);

        exception Busy {};

        void createFolderAsync (in ShellComponentListener listener,
                    in string physical_uri,
                    in string type)
            raises (Busy);

        void removeFolderAsync (in ShellComponentListener listener,
                    in string physical_uri,
                    in string type)
            raises (Busy);

        void xferFolderAsync (in ShellComponentListener listener,
                      in string source_physical_uri,
                      in string destination_physical_uri,
                      in string type,
                      in boolean remove_source)
            raises (Busy);

        void populateFolderContextMenu (in Bonobo::UIContainer uih,
                        in string physical_uri,
                        in string type);

        void userCreateNewItem (in string id)
            raises (UnsupportedType);
    };

    interface ShellComponentListener {
        enum Result {
            OK,
            UNSUPPORTED_OPERATION,
            UNSUPPORTED_TYPE,
            EXISTS,
            INVALID_URI,
            PERMISSION_DENIED,
            HAS_SUBFOLDERS,
            NO_SPACE
        };

        void notifyResult (in Result result);
    };
};
};