aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>2000-02-17 03:57:02 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-02-17 03:57:02 +0800
commitf8f771b3f36075b60d25c48595c4ff3964a3eea6 (patch)
treeab9cbc9ed689ed7dec1abc25bf72cd798fbc12ee /mail
parent8400162c3178a83c761f2628b5d97a9cdd2a7100 (diff)
downloadgsoc2013-evolution-f8f771b3f36075b60d25c48595c4ff3964a3eea6.tar.gz
gsoc2013-evolution-f8f771b3f36075b60d25c48595c4ff3964a3eea6.tar.zst
gsoc2013-evolution-f8f771b3f36075b60d25c48595c4ff3964a3eea6.zip
Add session.c
svn path=/trunk/; revision=1800
Diffstat (limited to 'mail')
-rw-r--r--mail/session.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/mail/session.c b/mail/session.c
new file mode 100644
index 0000000000..24197951f3
--- /dev/null
+++ b/mail/session.c
@@ -0,0 +1,67 @@
+/*
+ * session.c: handles the session infomration and resource manipulation
+ *
+ * Author:
+ * Miguel de Icaza (miguel@gnu.org)
+ *
+ * (C) 2000 Helix Code, Inc. http://www.helixcode.com
+ */
+#include <config.h>
+#include "session.h"
+#include "e-util/e-setup.h"
+#include "camel/camel.h"
+
+SessionStore *default_session;
+
+static void
+session_providers_init (void)
+{
+ camel_provider_register_as_module (CAMEL_PROVIDERDIR "/libcamelmbox.so");
+}
+
+SessionStore *
+session_store_new (const char *uri)
+{
+ SessionStore *ss = g_new (SessionStore, 1);
+
+ ss->session = camel_session_new ();
+ ss->store = camel_session_get_store (ss->session, uri);
+
+ g_assert (ss->session);
+ g_assert (ss->store);
+
+ return ss;
+}
+
+void
+session_store_destroy (SessionStore *ss)
+{
+ g_assert (ss != NULL);
+
+ gtk_object_unref (GTK_OBJECT (ss->store));
+ gtk_object_unref (GTK_OBJECT (ss->session));
+
+ g_free (ss);
+}
+
+static void
+init_default_session (void)
+{
+ char *url;
+
+ url = g_strconcat ("mbox://", evolution_folders_dir, NULL);
+ default_session = session_store_new (url);
+ g_free (url);
+}
+
+void
+session_init (void)
+{
+ e_setup_base_dir ();
+ camel_init ();
+ session_providers_init ();
+
+ init_default_session ();
+}
+
+
ch net/kmuddy Does not fetch net/netboot Does not build net-mgmt/jffnms Does not fetch net-p2p/frostwire Does not fetch net-p2p/azureus Does not fetch news/cleanscore Does not fetch news/nntpswitch Does not fetch news/p5-NewsLib Does not fetch russian/cyrproxy Does not fetch science/gerris Does not fetch security/opensaml Does not fetch sysutils/wmbattery Does not fetch sysutils/cpuburn No more public distfiles textproc/tei-guidelines-p4 Does not fetch textproc/tei-p4 Does not fetch textproc/py-hyperestraier Does not fetch textproc/tdtd.el Does not fetch textproc/tei-lite Does not fetch www/phpwiki13 Does not fetch www/p5-Apache-Scoreboard Depends on mod_perl www/p5-B-LexInfo Broken due the new mod_perl2 API www/phpwiki Does not fetch www/smb2www Apache13 is deprecated, migrate to 2.2.x+ now www/spip Checksum is changing daily www/monkey Does not fetch x11-toolkits/jdic Does not fetch x11-toolkits/py-kde Does not compile * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-241-2/+2 | | | | | | | | | - Fix all ports that add {CPP,LD}FLAGS to *_ENV to modify flags instead PR: 157936 Submitted by: myself Exp-runs by: pav Approved by: pav * Mark BROKEN: does not builderwin2011-05-181-0/+2 | * - Get Rid MD5 supportmiwi2011-03-201-1/+0 | * Reset dyeske@gmail.com at his request.linimon2009-02-032-4/+1 | | | | Hat: portmgr