All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Add agent API to message atom
@ 2010-08-30 15:50 Aki Niemi
  2010-08-31  0:06 ` Marcel Holtmann
  2010-08-31  3:37 ` Zhang, Caiwen
  0 siblings, 2 replies; 9+ messages in thread
From: Aki Niemi @ 2010-08-30 15:50 UTC (permalink / raw)
  To: ofono

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

---
 doc/message-api.txt |   97 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 97 insertions(+), 0 deletions(-)

diff --git a/doc/message-api.txt b/doc/message-api.txt
index 693a111..ce96315 100644
--- a/doc/message-api.txt
+++ b/doc/message-api.txt
@@ -26,6 +26,66 @@ Methods		dict GetProperties()
 
 			Send the message in text to the number in to.
 
+		void RegisterTextAgent(object path, string match)
+
+			Registers an agent to receive messages.
+
+			The object path defines the path of the agent that
+			will be called when a message is ready to be
+			dispatched.  The match parameter takes an optional
+			matching rule in a restricted subset of regular
+			expression syntax.
+
+			TODO: accepted regexp syntax.  Perhaps only allow
+			simple match rules for the beginning and end of a
+			message, as well as a free text token match for the
+			entire message.
+
+			Possible Errors: [service].Error.InvalidArguments
+					 [service].Error.InvalidFormat
+					 [service].Error.InUse
+
+		void RegisterPushAgent(object path, string id)
+
+			Registers an agent to receive push messages.
+
+			The object path defines the path of the agent that
+			will be called when a push message is ready to be
+			dispatched.  The id parameter takes an optional
+			WAP application ID that is used to match incoming
+			push messages.
+
+			Possible Errors: [service].Error.InvalidArguments
+					 [service].Error.InvalidFormat
+					 [service].Error.InUse
+
+		void RegisterApplicationAgent(object path, uint dest, uint src)
+
+			Registers an agent to receive application messages.
+
+			The object path defines the path of the agent that
+			will be called when an application message is ready
+			to be dispatched.
+
+			The dest parameter is the destination application
+			port number, and the src parameter is the optional
+			source application port number.
+
+			Possible Errors: [service].Error.InvalidArguments
+					 [service].Error.InvalidFormat
+					 [service].Error.InUse
+
+		void UnregisterAgent(object path)
+
+			Unregisters an agent.  If no agent is registered
+			that matches the type of an arriving message, it is
+			silently dropped.
+
+			Possible Errors: [service].Error.InvalidArguments
+					 [service].Error.InvalidFormat
+					 [service].Error.NotFound
+					 [service].Error.NotAuthorized
+
 Signals		PropertyChanged(string name, variant value)
 
 			This signal indicates a changed value of the given
@@ -64,3 +124,40 @@ Properties	string ServiceCenterAddress
 				"ps-preferred" - Use CS if PS is unavailable
 
 			By default oFono uses "cs-preferred" setting.
+
+
+MessageAgent Hierarchy [experimental]
+===============
+
+Service		unique name
+Interface	org.ofono.MessageAgent
+Object path	freely definable
+
+Methods		void ImmediateMessage(string message, dict info)
+
+			New immediate (class 0) SMS received.  Info has Sender,
+			LocalSentTime, and SentTime information.  Sender
+			address is given in string format.  LocalSentTime and
+			SentTime are given in string form using ISO8601 format.
+
+		void IncomingMessage(string message, dict info)
+
+			New incoming text SMS received.  Info has Sender,
+			LocalSentTime, and SentTime information.
+
+		void IncomingPush(array{byte} message, dict info)
+
+			New incoming push message received.  Info has Sender,
+			LocalSentTime, SentTime, and ApplicationId information.
+
+		void IncomingApplication(array{byte} message, dict info)
+
+			New incoming application message received.  Info has
+			Sender, LocalSentTime, SentTime, DestinationPort, and
+			SourcePort information.
+
+		void Release()
+
+			Agent is being released, possibly because of oFono
+			terminating, the MessageManager interface being torn
+			down or modem powering down.
-- 
1.7.0.4


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

end of thread, other threads:[~2010-09-01 12:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-30 15:50 [RFC] Add agent API to message atom Aki Niemi
2010-08-31  0:06 ` Marcel Holtmann
2010-08-31  6:15   ` Aki Niemi
2010-08-31 12:37     ` Marcel Holtmann
2010-08-31 15:04       ` Denis Kenzior
2010-09-01  5:57       ` Aki Niemi
2010-09-01 12:40         ` Marcel Holtmann
2010-08-31  3:37 ` Zhang, Caiwen
2010-08-31  6:20   ` Aki Niemi

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.