[Evolution-hackers] Creating Contact folders programatically
- From: "Patrick Gerzanics" <patrickg xcnetwork com>
- To: <evolution-hackers ximian com>
- Subject: [Evolution-hackers] Creating Contact folders programatically
- Date: Thu, 7 Aug 2003 21:32:45 -0500
I'm trying to programatically, via CORBA, create contact folders. I've been
trying for quite some time to get the Storage::asyncCreateFolder() call to
work, but it always returns a result of 1 which maps to Unsupported
Operation.
For Calendar/Task folders I was able to create the directory and the
metadata file by hand, and then have it open the folder with the 'create'
flag set to true. However, for contacts, this option does not exist. I've
tried creating an empty addressbook.db file and using a template empty
addressbook.db file, but to no avail. When the program tries to open the
folder it fails with a result of 5 - Protocol not supported.
Is there a way that I can get the Wombat to notice the new folder without
using the asyncCreateFolder call? Or, is there a reason the
asyncCreateFolder call returns the Unsupported Operation result when
executed on the Storage object returned by Shell::getLocalStorage()? I
began thinking today it might be because the storage object I'm getting back
from the getLocalStorage call is only a shell that returns the unsupported
operation result. I found this section in e-storage.c that made me consider
that possibility:
static void
impl_async_create_folder (EStorage *storage,
const char *path,
const char *type,
const char *description,
EStorageResultCallback callback,
void *data)
{
(* callback) (storage, E_STORAGE_NOTIMPLEMENTED, data);
}
Perhaps I need to obtain a StorageRegistry reference and get the storage
that way? If so, how to obtain a reference to a StorageRegistry object. I
couldn't find an OAF registration for it...
Any thoughts on this would be much appreciated as I'm nearly out of ideas.
Thanks!
-Patrick
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]