[Adium-devl] Importer API
disposable at infinitenexus.com
disposable at infinitenexus.com
Wed Apr 11 01:49:27 UTC 2007
On Apr 10, 2007, at 1:59 PM, Graham Booker wrote:
> 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.
Cheers for standard internal APIs :)
>
> 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
Password prompts need to be addressed as they will need to run as a
sheet and block until provided before creating the next account. That
or the dialogs that pop now will need to be suppressed and a new
password gathering phase added.
> 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
I'm totally biased, but it'd be nifty to standardize the 'create
status groups' option across importers as well, that way each
importer can cleanly add itself if the user chooses (with Fire
Available, iChat Available, iChat Away, Fire Away [no pun intended])
> 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.
Should we give them a cookie? :-D
>
> Thoughts?
Well reasoned and welcome. Great job Graham!
>
> - Graham
>
>
> _______________________________________________
> Adium-devl mailing list
> Adium-devl at adiumx.com
> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070410/9b7b6d80/attachment-0001.html>
More information about the devel
mailing list