def _entryid(self, event=False): # cal item entryid plus basedate (zero if not recurring) flag = b'\x01' if event else b'' eid = self.item._entryid or _bdec(self.item.entryid) basedate_val = self._basedate_val or 0 return _benc( flag + _utils.pack_short(len(eid)) + eid + _utils.pack_long(basedate_val) )
def entryid(self): # cal item entryid plus basedate (zero if not recurring) parts = [] eid = _bdec(self.item.entryid) parts.append(_utils.pack_short(len(eid))) parts.append(eid) basedate_val = self._basedate_val or 0 parts.append(_utils.pack_long(basedate_val)) return _benc(b''.join(parts))
def eventid(self): # msgraph has both appointments and expanded appointments under # /events, so we need an identier which can be used for both. eid = _bdec(self.entryid) return _benc(b'\x00' + _utils.pack_short(len(eid)) + eid)