Commit 25d12d27 authored by Jérome Perrin's avatar Jérome Perrin

ERP5ShortMessage: fix interface syntax and add some TODO

parent f9048ac7
...@@ -31,17 +31,23 @@ from zope.interface import Interface ...@@ -31,17 +31,23 @@ from zope.interface import Interface
class ISmsGateway(Interface): class ISmsGateway(Interface):
def send(self, text, recipient, def send(text, recipient,
sender=None, sender_title=None, sender=None, sender_title=None,
message_type="text",test=False, **kw): message_type="text", test=False, **kw):
"""Send a message.""" """Send a message.
TODO: write
def receive(self, REQUEST): TODO: is getAllowedMessageType part of this API ?
shouldn't we rely on content_type ? ( text/plain -> SMS, text/html -> MMS ? )
"""
def receive(REQUEST):
"""Public handler to push notification from the gateway""" """Public handler to push notification from the gateway"""
def getAllowedMessageType(self): def getAllowedMessageType():
"""List of all allowed message type when send a message.""" """List of all allowed message type when sending a message."""
def getMessageStatus(self, message_id): def getMessageStatus(message_id):
"""Retrive the status of a message """Retrieve the status of a message
Should return x in ['sent', 'delivered', 'queued', 'failed']""" Should return x in ['sent', 'delivered', 'queued', 'failed']"""
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment