Re: Pending API change



On top of that 

TnyPair will probably get a constructor that accepts things like:

tny_pair_new_from_string ("key=value", "=")

and

tny_pair_new_from_string ("key: value", ": ")

To that becomes:

tny_camel_account_add_option (account, 
	tny_pair_new_from_string ("use_tls=wrapped", "="));

TnyList *list = tny_simple_list_new ();
tny_camel_account_get_options (account, list);
TnyIterator *iter = tny_list_create_iterator (list);

while (!tny_iterator_is_done (iter)) {
	TnyPair *pair = tny_iterator_get_current (iter);
	g_print ("Account setting: %s = %s", 
		tny_pair_get_key (pair),
		tny_pair_get_value (pair));
	g_object_unref (pair);
	tny_iterator_next (iter);
}

g_object_unref (iter);
g_object_unref (list);

tny_camel_account_clear_options (account);


On Tue, 2008-04-22 at 11:15 +0200, Philip Van Hoof wrote:
> Hi there,
> 
> These are pending API changes to happen before 1.0 gets released:
> 
> These will make it possible to edit accounts:
> 
> Add: tny_camel_account_get_options (acc, list) where list gets filled up
>      with TnyPair instances
> 
> Add: tny_camel_account_clear_options (acc) or
>      tny_camel_account_remove_option (acc, TnyPair *pair) 
> 
> This one will affect everybody who uses TLS/SSL:
> 
> Change: tny_camel_account_add_option to become a TnyPair rather than a
>         string (it's a key-value string today, that's what TnyPair is
>         made for)
> 
> 
-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]