[Adium-devl] Importer API
Graham Booker
gbooker at cod3r.com
Tue Apr 10 18:59:59 UTC 2007
I noticed that the iChat importer was created (in its branch) with a
completely separate mechanism. I figured this would be a great
opportunity to merge together the UI's for both the Fire and iChat
importers to use a common Importer API instead (which will make
future importers easier to write). Anyway, I propose the following
API for importers to implement.
typedef enum{
IMPORT_TYPE_ACCOUNTS = 1,
IMPORT_TYPE_STATUS = 2,
IMPORT_TYPE_LOGS = 4
} ImportType;
- (id)initWithUIController:(ImportUIController *)importUIController;
- (int)importCapabilities;
//These return false if they failed for some reason
- (BOOL)importAccounts;
- (BOOL)importStatus;
//Note, the log import will take place in a thread.
- (BOOL)importLogs;
Here is the basic idea:
1) The UI asks the importer for its capabilities. Then, just like
the iChat importer, it prompts the user with the list of which items
to import.
2) If accounts are requested:
2a) Accounts are imported.
2b) Accounts are connected
2b) The importer has the ability to request notification of
connection, (the fire importer will), and it will do its actions
independently. This is not part of the API
3) If Statuses are requested, status messages are imported
4) If Logs are requested
4a) A new thread is spawned
4b) The new thread calls the log import
4c) The importer makes calls to the UI controller after each log
file, so that it can update its progress.
4d) The UI allows the user to continue when the log import is done
5) The importer informs the user of its completion and sends them on
their way.
Thoughts?
- Graham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070410/4208a2eb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1601 bytes
Desc: not available
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070410/4208a2eb/attachment.p7s>
More information about the devel
mailing list