[Adium-devl] libpurple account options in adium

Evan Schoenberg evan.s at dreskin.net
Tue Nov 27 10:41:47 UTC 2007


On Nov 26, 2007, at 10:12 PM, Eion Robb wrote:

>>> Does adium not listen to the purple_account_set_username function  
>>> too?
>> Nope.  You've got that bit backwards, I think; Adium tells libpurple
>> the username to use, not the other way around.  If you need to tell
>> libpurple a name other than the default (the Adium account's name),
>> you can override - (const char *)purpleAccountName in your
>> CBPurpleAccount subclass.
> Interesting.  :)  I've been using purple_account_set_username to  
> change the username for Pidgin.  From what I gather, the function  
> just sets account->username to be whatever you pass in.  Adium must  
> not look at this value when reading the username for the account  
> window?  Oh well, I'll try changing the CBPurpleAccount, which might  
> be tricky from the prpl side of things.
The prpl definitely shouldn't be doing anything with CBPurpleAccount!   
Perhaps you could describe further what you're trying to accomplish?

Libpurple is a tool used by Adium, not the driving force of its UI;  
Adium stores all relevant data for an account on its own and tells  
libpurple what it needs to know.

>>> Is is possible for a protocol in adium to not have a server/port/
>>> password?
>> Sure.  The Zephyr service does this.
> I've taken a look through the Zephyr service.  Am I right in saying  
> that it does it by removing the server option from the accounts  
> window in the nib?   Or is there a flag set like the  
> requiresPassword method in PurpleService?
It doesn't present a server option, and its account subclass says:
//Zephyr connects to a local host so need not disconnect/reconnect as  
the network changes
- (BOOL)connectivityBasedOnNetworkReachability
{
	return NO;
}

to interact properly with the autoconnect functionality.  Otherwise,  
it should Just Work; your prpl doesn't expect a server to be  
specified, and Adium doesn't specify one.

-Evan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20071127/3463c08e/attachment-0001.html>


More information about the devel mailing list