Re: [Evolution-hackers] how to initialize bf->priv->file_db

2009-08-13 Thread Milan Crha
On Thu, 2009-08-13 at 09:03 +0800, Saint yeyo wrote:
> 
> >   Hi,
> >maybe I will sound silly, but what type a bf is? What is its parent
> >object? You know, you just give here some expression from somewhere.
> >The context is missing, at least for me.
> >   Bye,
> >   Milan
> 
> sorry,
> 
> the data struct is like following:
> 
> EBookBackend *backend;
> 
> EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
> 
> DB *db = bf->priv->file_db; // here occurence segmentation
> fault
> 
> then  I tried
> 
> backend = malloc(sizeof(EBookBackend));
> backend->priv = malloc(sizeof(ebookbackendvcfprivate));
> backend->priv->file_db = malloc(sizeof(DB));
> 
> it's better, but still can't access the address of file_db, how can I
> do,
> 
> than you. 

Hi,
EBookBackend is a GObject, you should create it by g_object_new call.
But, you should never need to create a backend on your own, you should
use EBook with a proper ESource.

What exactly are you trying to do, please?
Bye,
Milan

P.S.: Please, never ever reply to digest, at least on evo lists.
Moreover, you kept there all the mail long because of quoting 5 lines of
text? That's not nice. Not talking about broken threading.

___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers


[Evolution-hackers] how to use e_contact_new_from_vcard function

2009-08-13 Thread Saint yeyo
hello,

while I used function 'e_contact_new_from_vcard (vcf_file) ' based on a
exported vcard file, but it's told me:

(Test_db_do:26548): libebook-WARNING **: vcard began without a BEGIN:VCARD


(Test_db_do:26548): libebook-WARNING **: vcard ended without END:VCARD

I am sure the vcard file is standard vcf file.

how can I make a contact from a vcard file? my target is build
'addressbook.db' from a given vcard file, I wanna know which function should
I use, and what's the order to call them.

thanks your help.
___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] how to use e_contact_new_from_vcard function

2009-08-13 Thread Milan Crha
On Thu, 2009-08-13 at 17:26 +0800, Saint yeyo wrote:
> while I used function 'e_contact_new_from_vcard (vcf_file) ' based on
> a exported vcard file 

Hi,
the vcf_file is a file name or a file content? It should be the file
content here, which contains those BEGIN:VCARD/END:VCARD tags.
Something like here [1], just not with a vCard.
Here's [2] a little big about EBooks. Look for other tests in that
folder for other "examples".
Hope that helps,
Milan

[1]
http://svn.gnome.org/viewvc/evolution-data-server/trunk/addressbook/tests/vcard/dump-vcard.c?revision=7761&view=markup

[2]
http://svn.gnome.org/viewvc/evolution-data-server/trunk/addressbook/tests/ebook/test-ebook.c?view=markup

___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers


[Evolution-hackers] Programmatically Invoking Contact Editor

2009-08-13 Thread Kip Warner
Greetings,

I have a pointer to an EContact in an application I am working on and
I'd like to progmatically invoke the contact editor GUI in Evolution
with this EContact loaded in it.

Can this be done, and if so, what steps are required? I took a look at
the Evolution API reference and I could find a lot on the EDS aspect,
but nothing on interacting with the GUI itself.

Thanks.

-- 
Kip Warner -- Software Developer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] Programmatically Invoking Contact Editor

2009-08-13 Thread Matthew Barnes
On Thu, 2009-08-13 at 11:08 -0700, Kip Warner wrote:
> I have a pointer to an EContact in an application I am working on and
> I'd like to progmatically invoke the contact editor GUI in Evolution
> with this EContact loaded in it.
> 
> Can this be done, and if so, what steps are required? I took a look at
> the Evolution API reference and I could find a lot on the EDS aspect,
> but nothing on interacting with the GUI itself.

In theory you should be able to pass the EContact's URI as a
command-line option to Evolution to invoke the editor, but I'm not
certain if this works at the moment.

Looking at the code that handles the URI, it seems to expect a
contact:// scheme and "source-uid" and "contact-uid" parameters, but I
don't have an example handy.  Hopefully the EContact's URI gives you
something close to that form.  You'll have to play around with it.

Matthew Barnes


signature.asc
Description: This is a digitally signed message part
___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] Programmatically Invoking Contact Editor

2009-08-13 Thread Kip Warner
On Thu, 2009-08-13 at 14:24 -0400, Matthew Barnes wrote:
> 
> In theory you should be able to pass the EContact's URI as a
> command-line option to Evolution to invoke the editor, but I'm not
> certain if this works at the moment.
> 
> Looking at the code that handles the URI, it seems to expect a
> contact:// scheme and "source-uid" and "contact-uid" parameters, but I
> don't have an example handy.  Hopefully the EContact's URI gives you
> something close to that form.  You'll have to play around with it.
> 
> Matthew Barnes

Thanks Matt. I've found the contact-uid by querying the EContact pointer
via e_contact_get_const(contact, E_CONTACT_UID), but I can't seem to
find the "source-uid" anywhere.

-- 
Kip Warner -- Software Developer
President & CEO Kshatra Corp.
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers