示例#1
0
 def add_message(self, sms, where=None):
     assert isinstance(sms, ShortMessage), "What are you trying to store?"
     return DBShortMessage(store=self.store,
                           number=to_u(sms.get_number()),
                           text=sms.get_text(),
                           date=Time.fromDatetime(sms.datetime),
                           where=where)
 def populate_networks(self, network_list):
     for net in network_list:
         dns1 = net.dns1 and to_u(net.dns1) or None
         dns2 = net.dns2 and to_u(net.dns2) or None
         DBNetworkOperator(store=self.store,
                           netid=net.netid,
                           name=to_u(net.name),
                           country=to_u(net.country),
                           type=to_u(net.type),
                           smsc=to_u(net.smsc),
                           apn=to_u(net.apn),
                           username=to_u(net.username),
                           password=to_u(net.password),
                           dns1=dns1,
                           dns2=dns2)
示例#3
0
 def populate_networks(self, network_list):
     for net in network_list:
         dns1 = net.dns1 and to_u(net.dns1) or None
         dns2 = net.dns2 and to_u(net.dns2) or None
         DBNetworkOperator(store=self.store,
                           netid=net.netid,
                           name=to_u(net.name),
                           country=to_u(net.country),
                           type=to_u(net.type),
                           smsc=to_u(net.smsc),
                           apn=to_u(net.apn),
                           username=to_u(net.username),
                           password=to_u(net.password),
                           dns1=dns1,
                           dns2=dns2)
 def __init__(self, name, number, index=None, group='SIM'):
     super(Contact, self).__init__()
     self.name = to_u(name)
     self.number = to_u(number)
     self.index = index
     self.group = to_u(group)
 def add_message(self, sms, where=None):
     assert isinstance(sms, ShortMessage), "What are you trying to store?"
     return DBShortMessage(store=self.store, number=to_u(sms.get_number()),
                     text=sms.get_text(),
                     date=Time.fromDatetime(sms.datetime),
                     where=where)
示例#6
0
 def __init__(self, name, number, index=None, group='SIM'):
     super(Contact, self).__init__()
     self.name = to_u(name)
     self.number = to_u(number)
     self.index = index
     self.group = to_u(group)
 def __init__(self, name, number, index=None):
     super(Contact, self).__init__()
     self.name = to_u(name)
     self.number = to_u(number)
     self.index = index
     self.writable = True
示例#8
0
 def __init__(self, name, number, index=None):
     super(Contact, self).__init__()
     self.name = to_u(name)
     self.number = to_u(number)
     self.index = index
     self.writable = True