All of lore.kernel.org
 help / color / mirror / Atom feed
* MAP implementation status
@ 2010-09-09 12:46 Radoslaw Jablonski
  2010-09-10 18:12 ` Gustavo F. Padovan
  2010-09-13 10:11 ` Counihan, Tom
  0 siblings, 2 replies; 4+ messages in thread
From: Radoslaw Jablonski @ 2010-09-09 12:46 UTC (permalink / raw)
  To: linux-bluetooth


  Hi all,
We plan to start implementation of Message Access Profile Server as 
obexd plugin. Before we start with coding part I need to check if 
someone else started implementing MAP Server, MNS Server of Map client.
If some code is already available, then we could combine our forces to 
add MAP support for OBEXD.

Thanks for any response,
Radek


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MAP implementation status
  2010-09-09 12:46 MAP implementation status Radoslaw Jablonski
@ 2010-09-10 18:12 ` Gustavo F. Padovan
  2010-09-10 18:26   ` Luiz Augusto von Dentz
  2010-09-13 10:11 ` Counihan, Tom
  1 sibling, 1 reply; 4+ messages in thread
From: Gustavo F. Padovan @ 2010-09-10 18:12 UTC (permalink / raw)
  To: Radoslaw Jablonski; +Cc: linux-bluetooth

Hi Radoslaw,

* Radoslaw Jablonski <ext-jablonski.radoslaw@nokia.com> [2010-09-09 15:46:33 +0300]:

> 
>   Hi all,
> We plan to start implementation of Message Access Profile Server as 
> obexd plugin. Before we start with coding part I need to check if 
> someone else started implementing MAP Server, MNS Server of Map client.
> If some code is already available, then we could combine our forces to 
> add MAP support for OBEXD.

We had a Google Summer of Code Project on MAP this year. Vinicius was
the mentor, he can talk about.

-- 
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MAP implementation status
  2010-09-10 18:12 ` Gustavo F. Padovan
@ 2010-09-10 18:26   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2010-09-10 18:26 UTC (permalink / raw)
  To: Gustavo F. Padovan; +Cc: Radoslaw Jablonski, linux-bluetooth

Hi,

On Fri, Sep 10, 2010 at 9:12 PM, Gustavo F. Padovan
<padovan@profusion.mobi> wrote:
> Hi Radoslaw,
>
> * Radoslaw Jablonski <ext-jablonski.radoslaw@nokia.com> [2010-09-09 15:46:33 +0300]:
>
>>
>>   Hi all,
>> We plan to start implementation of Message Access Profile Server as
>> obexd plugin. Before we start with coding part I need to check if
>> someone else started implementing MAP Server, MNS Server of Map client.
>> If some code is already available, then we could combine our forces to
>> add MAP support for OBEXD.
>
> We had a Google Summer of Code Project on MAP this year. Vinicius was
> the mentor, he can talk about.

iirc it was mainly a MAP client, the other parts that are missing is:

- MAP plugin + drivers
- Backend infrastructure
- Backends

-- 
Luiz Augusto von Dentz
Computer Engineer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: MAP implementation status
  2010-09-09 12:46 MAP implementation status Radoslaw Jablonski
  2010-09-10 18:12 ` Gustavo F. Padovan
@ 2010-09-13 10:11 ` Counihan, Tom
  1 sibling, 0 replies; 4+ messages in thread
From: Counihan, Tom @ 2010-09-13 10:11 UTC (permalink / raw)
  To: Radoslaw Jablonski, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 2074 bytes --]

Hi Radoslaw,

>-----Original Message-----
>From: linux-bluetooth-owner@vger.kernel.org [mailto:linux-bluetooth-
>owner@vger.kernel.org] On Behalf Of Radoslaw Jablonski
>Sent: 09 September 2010 13:47
>To: linux-bluetooth@vger.kernel.org
>Subject: MAP implementation status
>
>
>  Hi all,
>We plan to start implementation of Message Access Profile Server as
>obexd plugin. Before we start with coding part I need to check if
>someone else started implementing MAP Server, MNS Server of Map client.
>If some code is already available, then we could combine our forces to
>add MAP support for OBEXD.


This is something I've been focusing on recently.
Attached is my modest start to this.
My initial strategy - even though its IVI client side I'm most interested in - was to tackle server side, essentially bring up both sides of the interface incrementally.
I was going to employ a strategy of, instead of doing it in big bulk, dropping small unobtrusive patches into the trunk, so interested people could see and contribute to the activity.
I'm struggling in defining the right level of patch to upstream - maybe folks here can comment on the attached - is it of acceptable substance or would more meat be require to make it a meaningful contribution?

I've taken on board the suggestion from Marcel and Johan to focus on SMS data first. That makes sense to me. 
Hope the above and attached is of use.

Looking forward to hearing from you - any thoughts/insights/criticism are most welcome.

Regards
Tom
--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.


[-- Attachment #2: 0001-Initial-intro-for-MAP.patch --]
[-- Type: application/octet-stream, Size: 8107 bytes --]

From 66b42f3a3e1520d8cdb2b7549215224d0abde606 Mon Sep 17 00:00:00 2001
From: Tom Counihan <tom.counihan@intel.com>
Date: Sun, 5 Sep 2010 15:01:34 +0100
Subject: [PATCH] Initial intro for MAP

Bootstraping MAP implementation
---
 plugins/map.c |  232 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 plugins/sms.h |   49 ++++++++++++
 2 files changed, 281 insertions(+), 0 deletions(-)
 create mode 100644 plugins/map.c
 create mode 100644 plugins/sms.h

diff --git a/plugins/map.c b/plugins/map.c
new file mode 100644
index 0000000..2a483e7
--- /dev/null
+++ b/plugins/map.c
@@ -0,0 +1,232 @@
+/*
+ * OBEX Server
+ *
+ * Copyright (C) 2009-2010 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 as published by the Free Software Foundation.
+ *
+ * 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 Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ *
+ * Author Name <tom.counihan@intel.com>
+ *  - FIXME: Short log of changes
+ *
+ *
+ * FIXME: DOCUMENTATION: entry points and code roadmap. What does
+ * it do, how does it work, etc.
+ * 	- Postpone Notification feature until rudimentary functionality up
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <glib.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <arpa/inet.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <openobex/obex.h>
+#include <openobex/obex_const.h>
+
+#include "plugin.h"
+#include "log.h"
+#include "obex.h"
+#include "service.h"
+
+#define MAP_CHANNEL	16
+
+#define MAXLISTCOUNT_TAG	0x01
+#define STARTOFFSET_TAG	0x02
+#define FILTERMESSAGETYPE_TAG	0x03
+#define FILTERBEGINPERIOD_TAG	0x04
+#define ENDFILTERPERIODEND_TAG	0x05
+#define FILTERREADSTATUS_TAG	0x06
+#define FILTERRECIPIENT_TAG	0x07
+#define FILTERORIGINATOR_TAG	0x08
+#define FILTERPRIORITY_TAG	0x09
+#define ATTACHEMENT_TAG	0x0A
+#define TRANSPARENT_TAG 0x0B
+#define RETRY_TAG	0x0C
+#define NEWMESSAGE_TAG	0x0D
+#define NOTIFICATIONSTATUS_TAG	0x0E
+#define MASINSTANCEID_TAG	0x0F
+#define PARAMETERMASK_TAG	0x10
+#define FOLDERLISTINGSIZE_TAG	0x11
+#define MESSAGELISTINGSIZE_TAG	0x12
+#define SUBJECTLENGTH_TAG 0x13
+#define CHARSET_TAG 0x14
+#define FRACTIONREQUEST_TAG	0x15
+#define FRACTIONDELIVERED_TAG	0x16
+#define STATUSINDICATOR_TAG	0x17
+#define STATUSVALUE_TAG	0x18
+#define MSETIME_TAG	0x19
+
+/* The following length is in the unit of byte */
+#define MAXLISTCOUNT_LEN	2
+#define STARTOFFSET_LEN	2
+#define FILTERMESSAGETYPE_LEN	1
+#define FILTERREADSTATUS_LEN	1
+#define FILTERPRIORITY_LEN	1
+#define ATTACHEMENT_LEN	1
+#define TRANSPARENT_LEN 1
+#define RETRY_LEN	1
+#define NEWMESSAGE_LEN	1
+#define NOTIFICATIONSTATUS_LEN	1
+#define MASINSTANCEID_LEN	1
+#define PARAMETERMASK_LEN	4
+#define FOLDERLISTINGSIZE_LEN	2
+#define MESSAGELISTINGSIZE_LEN	2
+#define SUBJECTLENGTH_LEN 1
+#define CHARSET_LEN 1
+#define FRACTIONREQUEST_LEN	1
+#define FRACTIONDELIVERED_LEN	1
+#define STATUSINDICATOR_LEN	1
+#define STATUSVALUE_LEN	1
+
+#define MAP_RECORD "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>	\
+<record>								\
+  <attribute id=\"0x0001\">						\
+    <sequence>								\
+      <uuid value=\"0x1132\"/>						\
+    </sequence>								\
+  </attribute>								\
+									\
+  <attribute id=\"0x0004\">						\
+    <sequence>								\
+      <sequence>							\
+        <uuid value=\"0x0100\"/>					\
+      </sequence>							\
+      <sequence>							\
+        <uuid value=\"0x0003\"/>					\
+        <uint8 value=\"%u\" name=\"channel\"/>				\
+      </sequence>							\
+      <sequence>							\
+        <uuid value=\"0x0008\"/>					\
+      </sequence>							\
+    </sequence>								\
+  </attribute>								\
+									\
+  <attribute id=\"0x0009\">						\
+    <sequence>								\
+      <sequence>							\
+        <uuid value=\"0x1134\"/>					\
+        <uint16 value=\"0x0100\" name=\"version\"/>			\
+      </sequence>							\
+    </sequence>								\
+  </attribute>								\
+									\
+  <attribute id=\"0x0100\">						\
+    <text value=\"%s\" name=\"name\"/>					\
+  </attribute>								\
+									\
+  <attribute id=\"0x0316\">						\
+    <uint8 value=\"0x02\"/>						\
+  </attribute>								\
+</record>"
+
+
+static const uint8_t MAP_TARGET[TARGET_SIZE] = {
+			0xBB, 0x58, 0x2B, 0x40,  0x42, 0x0C, 0x11, 0xDB,
+			0xB0, 0xDE, 0x08, 0x00,  0x20, 0x0C, 0x9A, 0x66 };
+
+struct map_session {
+	struct apparam_field *params;
+	char *folder;
+	uint32_t find_handle;
+	GString *buffer;
+};
+
+/* TODO Fix this entry */
+struct cache_entry {
+	uint64_t handle;
+	char *id;
+	char *name;
+	char *sound;
+	char *tel;
+};
+
+
+static void *map_connect(struct obex_session *os, int *err)
+{
+	/* Rejects all connects for the moment */
+	struct map_session *map;
+
+	map = g_new0(struct map_session, 1);
+
+	return map;
+}
+
+static int map_get(struct obex_session *os, obex_object_t *obj,
+					gboolean *stream, void *user_data)
+{
+	/* Rejects all gets for the moment */
+	return -EBADR;
+}
+
+static int map_setpath(struct obex_session *os, obex_object_t *obj,
+		void *user_data)
+{
+	/* Rejects all set paths for the moment */
+	return -EBADR;
+}
+
+static void map_disconnect(struct obex_session *os, void *user_data)
+{
+	/* Rejects all disconnect for the moment */
+
+}
+
+static int map_chkput(struct obex_session *os, void *user_data)
+{
+	/* Rejects all PUTs */
+	return -EBADR;
+}
+
+
+static struct obex_service_driver map = {
+	.name = "Message Access server",
+	.service = OBEX_MAP,
+	.channel = MAP_CHANNEL,
+	.record = MAP_RECORD,
+	.target = MAP_TARGET,
+	.target_size = TARGET_SIZE,
+	.connect = map_connect,
+	.get = map_get,
+	.setpath = map_setpath,
+	.disconnect = map_disconnect,
+	.chkput = map_chkput
+};
+
+static int map_init(void)
+{
+	int err;
+
+
+	return 0;
+
+	return err;
+}
+static void map_exit(void)
+{
+	obex_service_driver_unregister(&map);
+
+}
+
+OBEX_PLUGIN_DEFINE(map, map_init, map_exit)
diff --git a/plugins/sms.h b/plugins/sms.h
new file mode 100644
index 0000000..8cc9a30
--- /dev/null
+++ b/plugins/sms.h
@@ -0,0 +1,49 @@
+/*
+ * OBEX Server
+ *
+ * Copyright (C) 2009-2010 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 as published by the Free Software Foundation.
+ *
+ * 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 Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ *
+ * Author Name <tom.counihan@intel.com>
+ *  - FIXME: Short log of changes
+ *
+ *
+ * FIXME: DOCUMENTATION: entry points and code roadmap. What does
+ * it do, how does it work, etc.
+ */
+
+struct apparam_field {
+	/* FolderListing and MessageListing attributes */
+	uint16_t maxlistcount;
+	uint16_t liststartoffset;
+
+	/* MessageListing attributes only */
+	uint8_t subjectlength;
+	uint32_t parametermask;
+	uint8_t filtermessagetype;
+	uint8_t *filterperiodbegin;
+	uint8_t *filterperiodend;
+	uint8_t filterreadstatus;
+	uint8_t *filterrecipient;
+	uint8_t *filteroriginator;
+	uint8_t filterpriority;
+
+	/* Message function attributes only */
+	uint8_t attachement;
+	uint8_t charset;
+	uint8_t fractionrequest;
+};
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-13 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-09 12:46 MAP implementation status Radoslaw Jablonski
2010-09-10 18:12 ` Gustavo F. Padovan
2010-09-10 18:26   ` Luiz Augusto von Dentz
2010-09-13 10:11 ` Counihan, Tom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.