/usr/lib/python2.7/dist-packages/kopano/autoaccept.py is in python-kopano 8.5.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | """
Part of the high-level python bindings for Kopano
Copyright 2005 - 2016 Zarafa and its licensors (see LICENSE file)
Copyright 2016 - Kopano and its licensors (see LICENSE file)
"""
from MAPI.Tags import (
PR_FREEBUSY_ENTRYIDS, PR_PROCESS_MEETING_REQUESTS,
PR_DECLINE_CONFLICTING_MEETING_REQUESTS,
PR_DECLINE_RECURRING_MEETING_REQUESTS
)
from MAPI.Defs import HrGetOneProp
from MAPI.Struct import SPropValue
from MAPI import MAPI_MODIFY, KEEP_OPEN_READWRITE
class AutoAccept(object):
"""AutoAccept class"""
def __init__(self, store):
fbeid = store.root.prop(PR_FREEBUSY_ENTRYIDS).value[1]
self._fb = store.mapiobj.OpenEntry(fbeid, None, MAPI_MODIFY)
self.store = store
@property
def enabled(self):
"""Auto-accept is enabled."""
return HrGetOneProp(self._fb, PR_PROCESS_MEETING_REQUESTS).Value
@enabled.setter
def enabled(self, b):
self._fb.SetProps([SPropValue(PR_PROCESS_MEETING_REQUESTS, b)])
self._fb.SaveChanges(KEEP_OPEN_READWRITE)
@property
def conflicts(self):
"""Conflicting appointments are accepted."""
prop = HrGetOneProp(self._fb, PR_DECLINE_CONFLICTING_MEETING_REQUESTS)
return not prop.Value
@conflicts.setter
def conflicts(self, b):
props = [SPropValue(PR_DECLINE_CONFLICTING_MEETING_REQUESTS, not b)]
self._fb.SetProps(props)
self._fb.SaveChanges(KEEP_OPEN_READWRITE)
@property
def recurring(self):
"""Recurring appointments are accepted."""
prop = HrGetOneProp(self._fb, PR_DECLINE_RECURRING_MEETING_REQUESTS)
return not prop.Value
@recurring.setter
def recurring(self, b):
props = [SPropValue(PR_DECLINE_RECURRING_MEETING_REQUESTS, not b)]
self._fb.SetProps(props)
self._fb.SaveChanges(KEEP_OPEN_READWRITE)
|