diff mbox series

[v3,6/6] doc/obex-api: Update documentation

Message ID 1583398524-18749-6-git-send-email-ajay.kishore@intel.com (mailing list archive)
State New, archived
Delegated to: Luiz Von Dentz
Headers show
Series [v3,1/6] obexd: Add initial support for MAP conversations | expand

Commit Message

Kishore, Ajay March 5, 2020, 8:55 a.m. UTC
This adds documentation with the conversation listing feature
---
 doc/obex-api.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

Comments

Luiz Augusto von Dentz March 5, 2020, 7:53 p.m. UTC | #1
Hi Ajay,

On Thu, Mar 5, 2020 at 1:21 AM Ajay Kishore <ajay.kishore@intel.com> wrote:
>
> This adds documentation with the conversation listing feature
> ---
>  doc/obex-api.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
>
> diff --git a/doc/obex-api.txt b/doc/obex-api.txt
> index f39355a..ef81460 100644
> --- a/doc/obex-api.txt
> +++ b/doc/obex-api.txt
> @@ -712,6 +712,44 @@ Methods            void SetFolder(string name)
>                         Possible errors: org.bluez.obex.Error.InvalidArguments
>                                          org.bluez.obex.Error.Failed
>
> +               array{object, dict} ListConversations(string folder, dict filter)

If we are going to return Message1 objects this should reuse
ListMessages and then use the Type filter to specify the types of
message to list, if that is not present then it should list
everything.

> +                       Returns an array containing the conversations found in the
> +                       given subfolder of the current folder, or in the current
> +                       folder if folder is empty.
> +
> +                       Possible Filters: MaxListCount, LastActivityBegin, LastActivityEnd,
> +                       ReadStatus, Recipient
> +
> +                       Each message is represented by an object path followed
> +                       by a dictionary of the properties.
> +
> +                       Properties:
> +
> +                               string id:

Properties should use the same format as methods in D-Bus, ID might be better.

> +
> +                                       Conversation unique identification
> +
> +                               string last_activity:

LastActivity

> +                                       Conversation timestamp for the last activity
> +
> +                               string chat_state:
> +
> +                                       Conversation current chat state of the participants

ChatState

> +                               string presence_availability:
> +
> +                                       Conversation  participants availability

Presence

> +                               string presence_text:

We could reuse Subject here.

> +                                       User defined status of the conversation
> +
> +                       Possible errors: org.bluez.obex.Error.InvalidArguments
> +                                        org.bluez.obex.Error.Failed
> +
> +

I though we discussed about this but it seems that the properties here
have no relation to Message1 which appears to be the objects you are
creating so you will have to introduce these properties also in
Message1, besides we need to include a new possible value for Type
e.g. "Conversation"

>                 void UpdateInbox(void)
>
>                         Request remote to update its inbox.
> @@ -799,6 +837,18 @@ Filter:            uint16 Offset:
>                         Possible values: True for high priority or False for
>                         non-high priority
>
> +               string LastActivityBegin:
> +
> +                       Filter conversations by starting period.
> +
> +                       Possible values: Date in "YYYYMMDDTHHMMSS" format.
> +
> +               string LastActivityEnd:
> +
> +                       Filter conversations by ending period.
> +
> +                       Possible values: Date in "YYYYMMDDTHHMMSS" format.
> +
>  Message hierarchy
>  =================
>
> --
> 2.7.4
>
Luiz Augusto von Dentz March 5, 2020, 7:58 p.m. UTC | #2
Hi Ajay,

On Thu, Mar 5, 2020 at 11:53 AM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Ajay,
>
> On Thu, Mar 5, 2020 at 1:21 AM Ajay Kishore <ajay.kishore@intel.com> wrote:
> >
> > This adds documentation with the conversation listing feature
> > ---
> >  doc/obex-api.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 50 insertions(+)
> >
> > diff --git a/doc/obex-api.txt b/doc/obex-api.txt
> > index f39355a..ef81460 100644
> > --- a/doc/obex-api.txt
> > +++ b/doc/obex-api.txt
> > @@ -712,6 +712,44 @@ Methods            void SetFolder(string name)
> >                         Possible errors: org.bluez.obex.Error.InvalidArguments
> >                                          org.bluez.obex.Error.Failed
> >
> > +               array{object, dict} ListConversations(string folder, dict filter)
>
> If we are going to return Message1 objects this should reuse
> ListMessages and then use the Type filter to specify the types of
> message to list, if that is not present then it should list
> everything.

Actually let me take this back, the properties appear to be very
different so combining those objects might not be reusing much, so
lets do this using ListConversation and Conversation1 objects with
their own properties, that said the names I suggested bellow still
hold.

> > +                       Returns an array containing the conversations found in the
> > +                       given subfolder of the current folder, or in the current
> > +                       folder if folder is empty.
> > +
> > +                       Possible Filters: MaxListCount, LastActivityBegin, LastActivityEnd,
> > +                       ReadStatus, Recipient
> > +
> > +                       Each message is represented by an object path followed
> > +                       by a dictionary of the properties.
> > +
> > +                       Properties:
> > +
> > +                               string id:
>
> Properties should use the same format as methods in D-Bus, ID might be better.
>
> > +
> > +                                       Conversation unique identification
> > +
> > +                               string last_activity:
>
> LastActivity
>
> > +                                       Conversation timestamp for the last activity
> > +
> > +                               string chat_state:
> > +
> > +                                       Conversation current chat state of the participants
>
> ChatState
>
> > +                               string presence_availability:
> > +
> > +                                       Conversation  participants availability
>
> Presence
>
> > +                               string presence_text:
>
> We could reuse Subject here.
>
> > +                                       User defined status of the conversation
> > +
> > +                       Possible errors: org.bluez.obex.Error.InvalidArguments
> > +                                        org.bluez.obex.Error.Failed
> > +
> > +
>
> I though we discussed about this but it seems that the properties here
> have no relation to Message1 which appears to be the objects you are
> creating so you will have to introduce these properties also in
> Message1, besides we need to include a new possible value for Type
> e.g. "Conversation"
>
> >                 void UpdateInbox(void)
> >
> >                         Request remote to update its inbox.
> > @@ -799,6 +837,18 @@ Filter:            uint16 Offset:
> >                         Possible values: True for high priority or False for
> >                         non-high priority
> >
> > +               string LastActivityBegin:
> > +
> > +                       Filter conversations by starting period.
> > +
> > +                       Possible values: Date in "YYYYMMDDTHHMMSS" format.
> > +
> > +               string LastActivityEnd:
> > +
> > +                       Filter conversations by ending period.
> > +
> > +                       Possible values: Date in "YYYYMMDDTHHMMSS" format.
> > +
> >  Message hierarchy
> >  =================
> >
> > --
> > 2.7.4
> >
>
>
> --
> Luiz Augusto von Dentz
diff mbox series

Patch

diff --git a/doc/obex-api.txt b/doc/obex-api.txt
index f39355a..ef81460 100644
--- a/doc/obex-api.txt
+++ b/doc/obex-api.txt
@@ -712,6 +712,44 @@  Methods		void SetFolder(string name)
 			Possible errors: org.bluez.obex.Error.InvalidArguments
 					 org.bluez.obex.Error.Failed
 
+		array{object, dict} ListConversations(string folder, dict filter)
+
+			Returns an array containing the conversations found in the
+			given subfolder of the current folder, or in the current
+			folder if folder is empty.
+
+			Possible Filters: MaxListCount, LastActivityBegin, LastActivityEnd,
+			ReadStatus, Recipient
+
+			Each message is represented by an object path followed
+			by a dictionary of the properties.
+
+			Properties:
+
+				string id:
+
+					Conversation unique identification
+
+				string last_activity:
+
+					Conversation timestamp for the last activity
+
+				string chat_state:
+
+					Conversation current chat state of the participants
+
+				string presence_availability:
+
+					Conversation  participants availability
+
+				string presence_text:
+
+					User defined status of the conversation
+
+			Possible errors: org.bluez.obex.Error.InvalidArguments
+					 org.bluez.obex.Error.Failed
+
+
 		void UpdateInbox(void)
 
 			Request remote to update its inbox.
@@ -799,6 +837,18 @@  Filter:		uint16 Offset:
 			Possible values: True for high priority or False for
 			non-high priority
 
+		string LastActivityBegin:
+
+			Filter conversations by starting period.
+
+			Possible values: Date in "YYYYMMDDTHHMMSS" format.
+
+		string LastActivityEnd:
+
+			Filter conversations by ending period.
+
+			Possible values: Date in "YYYYMMDDTHHMMSS" format.
+
 Message hierarchy
 =================