25 lines
885 B
Python
25 lines
885 B
Python
import weakref
|
|
|
|
from gsmmodem.models.Sms import Sms
|
|
|
|
|
|
class StatusReport(Sms):
|
|
""" An SMS status/delivery report
|
|
|
|
Note: the 'status' attribute of this class refers to this status report SM's status (whether
|
|
it has been read, etc). To find the status of the message that caused this status report,
|
|
use the 'deliveryStatus' attribute.
|
|
"""
|
|
|
|
DELIVERED = 0 # SMS delivery status: delivery successful
|
|
FAILED = 68 # SMS delivery status: delivery failed
|
|
|
|
def __init__(self, gsmModem, status, reference, number, timeSent, timeFinalized, deliveryStatus, smsc=None):
|
|
super(StatusReport, self).__init__(number, None, smsc)
|
|
self._gsmModem = weakref.proxy(gsmModem)
|
|
self.status = status
|
|
self.reference = reference
|
|
self.timeSent = timeSent
|
|
self.timeFinalized = timeFinalized
|
|
self.deliveryStatus = deliveryStatus
|