[Evolution-hackers] how to attach addressbook?



Hi,

After reading part of the source Evolution, I know I should call
functions in e-book.h and some other relative. I can import contact to
system addressbook now. I want to create a new addressbook, the
procedure is as follow:

----- part of the source -----
EBook *newBook = e_book_new_from_uri (uri, NULL);
e_book_open(newBook, FALSE, NULL);
e_book_add_contact(newBook, contact, NULL);
ESource *newBookSource = e_book_get_source(newBook);
e_source_set_name(newBookSource, "test3");

ESourceGroup *group = E_SOURCE_GROUP(g->data);
e_source_set_group(newBookSource, group);
e_source_group_add_source(group, newBookSource, 1);
-----------------------

"test3" was create in ".evolution/addressbook/local/" and contacts was
add the "addressbook.db". The problem is when I open Evolution, the
addressbook is not display in the list. Have I forgotten to do something?

Many many thanks!!

> Hey all.
>
> I am new to Evolution. I want to write a script to import contacts(vcard
> or ldif format) automaticly without opening Evolution. How can I do it?
> Is there a *.so file that includes this function? If so, how do I know
> the usage.
>
> Many many thanks:)
>
> Cameron Wong
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Evolution-hackers mailing list
> Evolution-hackers gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-hackers
>   


-- 
黄冠能
广东省LINUX公共服务技术支持中心
地址:广州市天河区水荫路115号天溢大厦A区四楼
电话:020-87048510/87048516 转2655
手机:13430266433
电邮:huang guanneng gd-linux com




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