diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c
new file mode 100644
index 0000000..0eab43b
--- /dev/null
+++ b/obexd/plugins/mas.c
+/*
+ *
+ * OBEX Server
+ *
+ * Copyright (C) 2010-2011 Nokia Corporation
+ *
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "plugin.h"
+#include "log.h"
+
+#include "messages.h"
+
+static int mas_init(void)
+{
+ return 0;
+}
+
+static void mas_exit(void)
+{
+}
+
+OBEX_PLUGIN_DEFINE(mas, mas_init, mas_exit)
diff --git a/obexd/plugins/messages-dummy.c b/obexd/plugins/messages-dummy.c
new file mode 100644
index 0000000..fd9679d
--- /dev/null
+++ b/obexd/plugins/messages-dummy.c
+/*
+ *
+ * OBEX Server
+ *
+ * Copyright (C) 2010-2011 Nokia Corporation
+ *
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "messages.h"
diff --git a/obexd/plugins/messages.h b/obexd/plugins/messages.h
new file mode 100644
index 0000000..c510244
--- /dev/null
+++ b/obexd/plugins/messages.h
+/*
+ *
+ * OBEX Server
+ *
+ * Copyright (C) 2010-2011 Nokia Corporation
+ *
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
diff --git a/obexd/src/main.c b/obexd/src/main.c
index 1e78615..8154e3b 100644
--- a/obexd/src/main.c
+++ b/obexd/src/main.c
static gboolean option_pcsuite = FALSE;
static gboolean option_symlinks = FALSE;
static gboolean option_syncevolution = FALSE;
+static gboolean option_mas = FALSE;
static gboolean parse_debug(const char *key, const char *value,
gpointer user_data, GError **error)
"Enable PC Suite Services server" },
{ "syncevolution", 'e', 0, G_OPTION_ARG_NONE, &option_syncevolution,
"Enable OBEX server for SyncEvolution" },
+ { "mas", 'm', 0, G_OPTION_ARG_NONE, &option_mas,
+ "Enable Message Access server" },
{ NULL },
};
if (option_opp == FALSE && option_ftp == FALSE &&
option_pbap == FALSE &&
option_irmc == FALSE &&
- option_syncevolution == FALSE) {
+ option_syncevolution == FALSE &&
+ option_mas == FALSE) {
fprintf(stderr, "No server selected (use either "
- "--opp, --ftp, --pbap, --irmc or --syncevolution)\n");
+ "--opp, --ftp, --pbap, --irmc, --mas, or --syncevolution)\n");
exit(EXIT_FAILURE);
}
obex_server_init(OBEX_SYNCEVOLUTION, NULL, TRUE, FALSE,
FALSE, NULL);
+ if (option_mas == TRUE)
+ obex_server_init(OBEX_MAS, NULL, TRUE, FALSE, FALSE, NULL);
+
if (!root_folder_setup(option_root, option_root_setup)) {
error("Unable to setup root folder %s", option_root);
exit(EXIT_FAILURE);
diff --git a/obexd/src/obex.h b/obexd/src/obex.h
index c3f6e3d..94274c2 100644
--- a/obexd/src/obex.h
+++ b/obexd/src/obex.h
#define OBEX_IRMC (1 << 5)
#define OBEX_PCSUITE (1 << 6)
#define OBEX_SYNCEVOLUTION (1 << 7)
+#define OBEX_MAS (1 << 8)
#define TARGET_SIZE 16