aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>2000-01-25 12:41:58 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-25 12:41:58 +0800
commita315f0321395423c3c52adb4bb3063c433948dd5 (patch)
tree74257c57766f816f29100ea686eef8e5d6e458bb
parent0cccd4dc239e8236dc54f338625e77986813a913 (diff)
downloadgsoc2013-evolution-a315f0321395423c3c52adb4bb3063c433948dd5.tar.gz
gsoc2013-evolution-a315f0321395423c3c52adb4bb3063c433948dd5.tar.zst
gsoc2013-evolution-a315f0321395423c3c52adb4bb3063c433948dd5.zip
When will I ever learn to add the files... - Federico
svn path=/trunk/; revision=1625
-rw-r--r--calendar/Makefile.am2
-rw-r--r--calendar/gui/Makefile.am2
-rw-r--r--calendar/pcs/tlacuache.c101
-rw-r--r--calendar/tlacuache.c101
4 files changed, 206 insertions, 0 deletions
diff --git a/calendar/Makefile.am b/calendar/Makefile.am
index 135ffc4926..89f6becfa1 100644
--- a/calendar/Makefile.am
+++ b/calendar/Makefile.am
@@ -120,6 +120,8 @@ $(GNOME_CALENDAR_CORBA_GENERATED): gnome-calendar.idl
tlacuache_SOURCES = \
$(GNOME_CALENDAR_CORBA_GENERATED) \
+ alarm.c \
+ alarm.h \
cal.c \
cal.h \
cal-backend.c \
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
index 135ffc4926..89f6becfa1 100644
--- a/calendar/gui/Makefile.am
+++ b/calendar/gui/Makefile.am
@@ -120,6 +120,8 @@ $(GNOME_CALENDAR_CORBA_GENERATED): gnome-calendar.idl
tlacuache_SOURCES = \
$(GNOME_CALENDAR_CORBA_GENERATED) \
+ alarm.c \
+ alarm.h \
cal.c \
cal.h \
cal-backend.c \
diff --git a/calendar/pcs/tlacuache.c b/calendar/pcs/tlacuache.c
new file mode 100644
index 0000000000..159d8b14ca
--- /dev/null
+++ b/calendar/pcs/tlacuache.c
@@ -0,0 +1,101 @@
+/* Tlacuache - personal calendar server main module
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * Author: Federico Mena-Quintero <federico@helixcode.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <libgnorba/gnorba.h>
+#include <bonobo/gnome-bonobo.h>
+#include "cal-factory.h"
+
+
+
+/* The calendar factory */
+static CalFactory *factory;
+
+/* The alarms code needs this */
+int debug_alarms = FALSE;
+
+
+
+/* Creates and registers the calendar factory */
+static gboolean
+create_cal_factory (void)
+{
+ CORBA_Object object;
+ CORBA_Environment ev;
+ int result;
+
+ factory = cal_factory_new ();
+ if (!factory) {
+ g_message ("create_cal_factory(): could not create the calendar factory!");
+ return FALSE;
+ }
+
+ object = gnome_object_corba_objref (GNOME_OBJECT (factory));
+
+ CORBA_exception_init (&ev);
+ result = goad_server_register (CORBA_OBJECT_NIL,
+ object,
+ "calendar:cal-factory",
+ "object",
+ &ev);
+
+ if (ev._major != CORBA_NO_EXCEPTION || result == -1) {
+ g_message ("create_cal_factory(): could not register the calendar factory");
+ CORBA_exception_free (&ev);
+ return FALSE;
+ } else if (result == -2) {
+ g_message ("create_cal_factory(): a calendar factory is already registered");
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
+ CORBA_exception_free (&ev);
+ return TRUE;
+}
+
+int
+main (int argc, char **argv)
+{
+ CORBA_Environment ev;
+
+ bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ textdomain (PACKAGE);
+
+ CORBA_exception_init (&ev);
+ gnome_CORBA_init ("tlacuache", VERSION, &argc, argv, GNORBA_INIT_SERVER_FUNC, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_message ("main(): could not initialize the ORB");
+ CORBA_exception_free (&ev);
+ exit (1);
+ }
+ CORBA_exception_free (&ev);
+
+ if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) {
+ g_message ("main(): could not initialize Bonobo");
+ exit (1);
+ }
+
+ if (!create_cal_factory ())
+ exit (1);
+
+ bonobo_main ();
+ return 0;
+}
diff --git a/calendar/tlacuache.c b/calendar/tlacuache.c
new file mode 100644
index 0000000000..159d8b14ca
--- /dev/null
+++ b/calendar/tlacuache.c
@@ -0,0 +1,101 @@
+/* Tlacuache - personal calendar server main module
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * Author: Federico Mena-Quintero <federico@helixcode.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <libgnorba/gnorba.h>
+#include <bonobo/gnome-bonobo.h>
+#include "cal-factory.h"
+
+
+
+/* The calendar factory */
+static CalFactory *factory;
+
+/* The alarms code needs this */
+int debug_alarms = FALSE;
+
+
+
+/* Creates and registers the calendar factory */
+static gboolean
+create_cal_factory (void)
+{
+ CORBA_Object object;
+ CORBA_Environment ev;
+ int result;
+
+ factory = cal_factory_new ();
+ if (!factory) {
+ g_message ("create_cal_factory(): could not create the calendar factory!");
+ return FALSE;
+ }
+
+ object = gnome_object_corba_objref (GNOME_OBJECT (factory));
+
+ CORBA_exception_init (&ev);
+ result = goad_server_register (CORBA_OBJECT_NIL,
+ object,
+ "calendar:cal-factory",
+ "object",
+ &ev);
+
+ if (ev._major != CORBA_NO_EXCEPTION || result == -1) {
+ g_message ("create_cal_factory(): could not register the calendar factory");
+ CORBA_exception_free (&ev);
+ return FALSE;
+ } else if (result == -2) {
+ g_message ("create_cal_factory(): a calendar factory is already registered");
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
+ CORBA_exception_free (&ev);
+ return TRUE;
+}
+
+int
+main (int argc, char **argv)
+{
+ CORBA_Environment ev;
+
+ bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ textdomain (PACKAGE);
+
+ CORBA_exception_init (&ev);
+ gnome_CORBA_init ("tlacuache", VERSION, &argc, argv, GNORBA_INIT_SERVER_FUNC, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_message ("main(): could not initialize the ORB");
+ CORBA_exception_free (&ev);
+ exit (1);
+ }
+ CORBA_exception_free (&ev);
+
+ if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) {
+ g_message ("main(): could not initialize Bonobo");
+ exit (1);
+ }
+
+ if (!create_cal_factory ())
+ exit (1);
+
+ bonobo_main ();
+ return 0;
+}