diff options
author | Michael Zucci <zucchi@src.gnome.org> | 2005-05-04 13:37:51 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-05-04 13:37:51 +0800 |
commit | 3509757d148d80a78a942b1e3938bead90b5d506 (patch) | |
tree | c99d23b07961365d554eb78e5e77ecbdb3016b1c /plugins/mail-remote/mail-remote.c | |
parent | f56ef1dbe184bc792c301092ff91d3d92fb48371 (diff) | |
download | gsoc2013-evolution-3509757d148d80a78a942b1e3938bead90b5d506.tar gsoc2013-evolution-3509757d148d80a78a942b1e3938bead90b5d506.tar.gz gsoc2013-evolution-3509757d148d80a78a942b1e3938bead90b5d506.tar.bz2 gsoc2013-evolution-3509757d148d80a78a942b1e3938bead90b5d506.tar.lz gsoc2013-evolution-3509757d148d80a78a942b1e3938bead90b5d506.tar.xz gsoc2013-evolution-3509757d148d80a78a942b1e3938bead90b5d506.tar.zst gsoc2013-evolution-3509757d148d80a78a942b1e3938bead90b5d506.zip |
Initial work on remote mail interface, as a plugin.
svn path=/trunk/; revision=29265
Diffstat (limited to 'plugins/mail-remote/mail-remote.c')
-rw-r--r-- | plugins/mail-remote/mail-remote.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/mail-remote/mail-remote.c b/plugins/mail-remote/mail-remote.c new file mode 100644 index 0000000000..369a38da2b --- /dev/null +++ b/plugins/mail-remote/mail-remote.c @@ -0,0 +1,31 @@ + +#include "evolution-mail-session.h" +#include <bonobo/bonobo-main.h> + +#define MAIL_SESSION_ID "OAFIID:GNOME_Evolution_Mail_Session:" BASE_VERSION + +init() +{ + static EvolutionMailSession *sess; + /* placeholder for EvolutionMailSession registration, this must use a different poa */ + if (sess == NULL) { + static PortableServer_POA poa = NULL; + int res; + CORBA_Object existing; + + if (poa == NULL) + poa = bonobo_poa_get_threaded (ORBIT_THREAD_HINT_PER_REQUEST, NULL); + + sess = g_object_new(evolution_mail_session_get_type(), NULL); //"poa", poa, NULL); + + if ((res = bonobo_activation_register_active_server_ext(MAIL_SESSION_ID, bonobo_object_corba_objref((BonoboObject *)sess), NULL, + Bonobo_REGISTRATION_FLAG_NO_SERVERINFO, &existing, NULL)) != Bonobo_ACTIVATION_REG_SUCCESS) { + g_warning("Could not register Mail EDS Interface: %d", res); + g_object_unref(sess); + sess = NULL; + } + + if (existing != CORBA_OBJECT_NIL) + CORBA_Object_release(existing, NULL); + } +} |