def parse(self, value): v = value.replace("\r", "").replace("\t", "").strip() if v == '*': self.star = True else: self.displayname, uristr, self.params, brackets = name_addr.parse( v) self.uri.parse(uristr) if (not brackets) and (len(self.uri.params) > 0) and (len( self.uri.headers) == 0) and (len(self.params) == 0): self.params = self.uri.params self.uri.params = [] prmlen = range(0, len(self.params)) if len(self.params): prmlen.reverse() for i in prmlen: if self.params[i].startswith(","): self.next = Contact(self.params[i][1:]) self.params[i:i + 1] = [] elif self.params[i].lower().startswith("q="): self.q = self.params[i][2:] self.params[i:i + 1] = [] elif self.params[i].lower().startswith("expires="): self.expires = self.params[i][8:] self.params[i:i + 1] = []
def sub_parse(self, sub_value): self.displayname, uristr, self.params, brackets = name_addr.parse(sub_value) self.uri.parse(uristr) if (not brackets) and (len(self.uri.params) > 0) and (len(self.uri.headers) == 0) and (len(self.params) == 0): self.params = self.uri.params self.uri.params = [] for i in self.uri.params: if i in ('lr', 'LR', 'Lr', 'lR'): self.looseRouter = True elif i.lower().startswith('lr='): self.looseRouter = True
def parse(self, value): v = value.replace("\r", "").replace("\t", "").strip() self.displayname, uristr, self.params, brackets = name_addr.parse(v) self.uri.parse(uristr) if (not brackets) and (len(self.uri.params) > 0) and (len(self.uri.headers) == 0) and (len(self.params) == 0): self.params = self.uri.params self.uri.params = [] paramslen = range(0, len(self.params)) paramslen.reverse() for i in paramslen: if (self.params[i].lower().startswith("tag=")): self.tag = self.params[i][4:] self.params[i:i+1] = []
def sub_parse(self, sub_value): self.displayname, uristr, self.params, brackets = name_addr.parse( sub_value) self.uri.parse(uristr) if (not brackets) and (len(self.uri.params) > 0) and (len( self.uri.headers) == 0) and (len(self.params) == 0): self.params = self.uri.params self.uri.params = [] for i in self.uri.params: if i in ('lr', 'LR', 'Lr', 'lR'): self.looseRouter = True elif i.lower().startswith('lr='): self.looseRouter = True
def parse(self, value): v = value.replace("\r", "").replace("\t", "").strip() self.displayname, uristr, self.params, brackets = name_addr.parse(v) self.uri.parse(uristr) if (not brackets) and (len(self.uri.params) > 0) and (len(self.uri.headers) == 0) and (len(self.params) == 0): self.params = self.uri.params self.uri.params = [] prmlen = range(0, len(self.params)) if len(self.params): prmlen.reverse() for i in prmlen: if self.params[i].startswith(","): self.next = Remotepartyid(self.params[i][1:]) self.params[i:i+1] = []
def parse(self, value): v = value.replace("\r", "").replace("\t", "").strip() self.displayname, uristr, self.params, brackets = name_addr.parse(v) self.uri.parse(uristr) if (not brackets) and (len(self.uri.params) > 0) and (len( self.uri.headers) == 0) and (len(self.params) == 0): self.params = self.uri.params self.uri.params = [] paramslen = range(0, len(self.params)) paramslen.reverse() for i in paramslen: if (self.params[i].lower().startswith("tag=")): self.tag = self.params[i][4:] self.params[i:i + 1] = []
def parse(self, value): v = value.replace("\r", "").replace("\t", "").strip() self.displayname, uristr, self.params, brackets = name_addr.parse(v) self.uri.parse(uristr) if (not brackets) and (len(self.uri.params) > 0) and (len( self.uri.headers) == 0) and (len(self.params) == 0): self.params = self.uri.params self.uri.params = [] prmlen = range(0, len(self.params)) if len(self.params): prmlen.reverse() for i in prmlen: if self.params[i].startswith(","): self.next = Remotepartyid(self.params[i][1:]) self.params[i:i + 1] = []
def parse(self, value): v = value.replace("\r", "").replace("\t", "").strip() if v == '*': self.star = True else: self.displayname, uristr, self.params, brackets = name_addr.parse(v) self.uri.parse(uristr) if (not brackets) and (len(self.uri.params) > 0) and (len(self.uri.headers) == 0) and (len(self.params) == 0): self.params = self.uri.params self.uri.params = [] prmlen = range(0, len(self.params)) if len(self.params): prmlen.reverse() for i in prmlen: if self.params[i].startswith(","): self.next = Contact(self.params[i][1:]) self.params[i:i+1] = [] elif self.params[i].lower().startswith("q="): self.q = self.params[i][2:] self.params[i:i+1] = [] elif self.params[i].lower().startswith("expires="): self.expires = self.params[i][8:] self.params[i:i+1] = []