当前位置: 首页>>代码示例>>Python>>正文


Python SipGenericHF.__init__方法代码示例

本文整理汇总了Python中SipGenericHF.SipGenericHF.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SipGenericHF.__init__方法的具体用法?Python SipGenericHF.__init__怎么用?Python SipGenericHF.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SipGenericHF.SipGenericHF的用法示例。


在下文中一共展示了SipGenericHF.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, address = None):
     SipGenericHF.__init__(self, body)
     if body != None:
         csvs = []
         pidx = 0
         while 1:
             idx = body.find(',', pidx)
             if idx == -1:
                 break;
             onum = body[:idx].count('<')
             cnum = body[:idx].count('>')
             qnum = body[:idx].count('"')
             if (onum == 0 and cnum == 0 and qnum == 0) or (onum > 0 and \
               onum == cnum and (qnum % 2 == 0)):
                 csvs.append(body[:idx])
                 body = body[idx + 1:]
                 pidx = 0
             else:
                 pidx = idx + 1
         if (len(csvs) > 0):
             csvs.append(body)
             raise ESipHeaderCSV(None, csvs)
     else:
         self.parsed = True
         self.address = address
开发者ID:LaoHanTeam,项目名称:sippy,代码行数:27,代码来源:SipAddressHF.py

示例2: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body=None, protocol=None, cause=None, reason=None):
     SipGenericHF.__init__(self, body)
     if body == None:
         self.parsed = True
         self.protocol = protocol
         self.cause = cause
         self.reason = reason
开发者ID:BackupTheBerlios,项目名称:sippy,代码行数:9,代码来源:SipReason.py

示例3: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, username = None, uri = None, realm = None, nonce = None, response = None, \
              password = None, method = None, cself = None):
     SipGenericHF.__init__(self, body)
     if body != None:
         return
     self.parsed = True
     if cself != None:
         self.username = cself.username
         self.uri = cself.uri
         self.realm = cself.realm
         self.nonce = cself.nonce
         self.response = cself.response
         self.qop = cself.qop
         self.cnonce = cself.cnonce
         self.nc = cself.nc
         self.otherparams = cself.otherparams[:]
         return
     self.username = username
     self.uri = uri
     self.realm = realm
     self.nonce = nonce
     if response == None:
         HA1 = DigestCalcHA1('md5', username, realm, password, nonce, '')
         self.response = DigestCalcResponse(HA1, nonce, 0, '', '', method, uri, '')
     else:
         self.response = response
     self.otherparams = []
开发者ID:gtkiller,项目名称:b2bua,代码行数:29,代码来源:SipAuthorization.py

示例4: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, address = None):
     if body == '*':
         SipGenericHF.__init__(self, body)
         self.asterisk = True
         return
     SipAddressHF.__init__(self, body, address)
     if body == None and address == None:
         self.address = SipAddress(name = 'Anonymous', url = SipURL(host = SipConf.my_address, port = SipConf.my_port))
开发者ID:biddyweb,项目名称:b2bua,代码行数:10,代码来源:SipContact.py

示例5: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, cseq = None, method = None):
     SipGenericHF.__init__(self, body)
     if body == None:
         self.parsed = True
         self.method = method
         if cseq != None:
             self.cseq = cseq
         else:
             self.cseq = 1
开发者ID:LaoHanTeam,项目名称:sippy,代码行数:11,代码来源:SipCSeq.py

示例6: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body=None, name=None):
     SipGenericHF.__init__(self, body)
     self.parsed = True
     if body != None:
         self.name = body
     elif name != None:
         self.name = name
     else:
         self.name = SipConf.my_uaname
开发者ID:BackupTheBerlios,项目名称:sippy,代码行数:11,代码来源:SipServer.py

示例7: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, ciscoGUID = None):
     SipGenericHF.__init__(self, body)
     if body != None:
         return
     self.parsed = True
     if ciscoGUID != None:
         self.ciscoGUID = ciscoGUID
     else:
         s = md5(str((random() * 1000000000L) + time())).hexdigest()
         self.ciscoGUID = (long(s[0:8], 16), long(s[8:16], 16), long(s[16:24], 16), long(s[24:32], 16))
开发者ID:biddyweb,项目名称:b2bua,代码行数:12,代码来源:SipCiscoGUID.py

示例8: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, realm = None, nonce = None):
     SipGenericHF.__init__(self, body)
     if body != None:
         return
     self.parsed = True
     if nonce == None:
         ctime = time()
         nonce = md5(str((random() * 1000000000L) + ctime)).hexdigest() + hex(int(ctime))[2:]
     if realm == None:
         realm = SipConf.my_address
     self.realm = realm
     self.nonce = nonce
开发者ID:gtkiller,项目名称:b2bua,代码行数:14,代码来源:SipWWWAuthenticate.py

示例9: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, call_id = None, from_tag = None, to_tag = None, \
   early_only = False, params = None):
     SipGenericHF.__init__(self, body)
     if body != None:
         return
     self.parsed = True
     self.params = []
     self.call_id = call_id
     self.from_tag = from_tag
     self.to_tag = to_tag
     self.early_only = early_only
     if params != None:
         self.params = params[:]
开发者ID:biddyweb,项目名称:b2bua,代码行数:15,代码来源:SipReplaces.py

示例10: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, sipver = None, hostname = None, port = None, params = None):
     if body != None and body.find(',') > -1:
         raise ESipHeaderCSV(None, body.split(','))
     SipGenericHF.__init__(self, body)
     if body == None:
         self.parsed = True
         self.params = {}
         if sipver == None:
             self.sipver = 'SIP/2.0/UDP'
         else:
             self.sipver = sipver
         if hostname == None:
             self.hostname = SipConf.my_address
             self.port = SipConf.my_port
             self.params['rport'] = None
         else:
             self.hostname = hostname
             self.port = port
         if params != None:
             self.params = params
开发者ID:DarthRa,项目名称:pulsar,代码行数:22,代码来源:SipVia.py

示例11: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, number = 0):
     SipGenericHF.__init__(self, body)
     if body == None:
         self.parsed = True
         self.number = number
开发者ID:DarthRa,项目名称:pulsar,代码行数:7,代码来源:SipNumericHF.py

示例12: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, methods = None):
     SipGenericHF.__init__(self, body)
     if body == None:
         self.parsed = True
         self.methods = methods[:]
开发者ID:biddyweb,项目名称:b2bua,代码行数:7,代码来源:SipAllow.py

示例13: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None):
     SipGenericHF.__init__(self, body)
     self.parsed = True
     if body == None:
         self.body = md5(str((random() * 1000000000L) + time())).hexdigest() + '@' + str(SipConf.my_address)
开发者ID:biddyweb,项目名称:b2bua,代码行数:7,代码来源:SipCallId.py

示例14: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body = None, caps = None):
     SipGenericHF.__init__(self, body)
     if body == None:
         self.parsed = True
         self.caps = caps[:]
开发者ID:biddyweb,项目名称:b2bua,代码行数:7,代码来源:SipSupported.py

示例15: __init__

# 需要导入模块: from SipGenericHF import SipGenericHF [as 别名]
# 或者: from SipGenericHF.SipGenericHF import __init__ [as 别名]
 def __init__(self, body):
     SipGenericHF.__init__(self, body)
     self.parsed = True
开发者ID:DarthRa,项目名称:pulsar,代码行数:5,代码来源:SipContentType.py


注:本文中的SipGenericHF.SipGenericHF.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。