File: GNOME_Evolution_Importer.idl

package info (click to toggle)
evolution 2.0.4-2sarge3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 86,600 kB
  • ctags: 29,239
  • sloc: ansic: 282,229; sh: 11,353; xml: 7,480; makefile: 3,293; perl: 1,591
file content (97 lines) | stat: -rw-r--r-- 2,066 bytes parent folder | download
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
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Interfaces for the importer framework.
 *
 * Authors:
 *   Iain Holmes  <iain@ximian.com>
 *
 * Copyright (C) 2000 Ximian, Inc.
 */

#include <Bonobo.idl>

module GNOME {
module Evolution {
	interface ImporterListener : Bonobo::Unknown {
		enum ImporterResult {
			OK,
			UNSUPPORTED_OPERATION,
			NOT_READY,
			BUSY,
			UNKNOWN_DATA,
			BAD_DATA,
			BAD_FILE
		};

		/**
		 * notifyResult:
		 * @result: The result of the import.
		 * @more_items: Are there any more items to be processed?
		 *
		 * Notifies the listener of the result and whether there are
		 * any more items to be imported.
		 */
		oneway void notifyResult (in ImporterResult result,
		  			   in boolean more_items);
	};

	interface Importer : Bonobo::Unknown {

		/**
		 * processItem:
		 * @listener: The ImporterListener that will be notified of the
		 * progress.
		 *
		 * Processes the next item.
		 *
		 */
		oneway void processItem (in ImporterListener listener);

		/**
		 * getError:
		 * 
		 * Retrieve a detailed explaination of the error.
		 *
		 * Returns: A string.
		 */
		string getError ();

		void createControl (out Bonobo::Control control);

		/**
		 * supportFormat:
		 * @filename: The filename of the file.
		 *
		 * Checks if the importer created by this factory can 
		 * import the file specified.
		 *
		 * Returns: A boolean, TRUE if it can import the file,
		 * FALSE otherwise.
		 */
		boolean supportFormat (in string filename);

		/**
		 * loadFile:
		 * @filename: The filename of the file.
		 * @folderpath: The full pathname to the folder.
		 * @foldertpe: The type of the folder to import to.
		 * 
		 * Loads the file and prepares an Importer object that can
		 * process files of this type.
		 *
		 * Returns: An Importer object.
		 */
		boolean loadFile (in string filename);
	};

	interface IntelligentImporter : Bonobo::Unknown {

		readonly attribute string importername;
		readonly attribute string message;

		boolean canImport ();

		void importData ();
	};
};
};