Example #1
0
    def update_bfcp(self, value):
        if not self.__attached__:
            raise exceptions.LogoutException('Phone is not attached')
        if not self.protocol == 'SIP':
            raise exceptions.PyAXLException('To change BFCP the phone must support SIP protocol')

        # only available for newer version, is this flag is not present we need to do it with sql
        if hasattr(self, 'AllowPresentationSharingUsingBfcp'):
            clone = copy(self)
            clone.AllowPresentationSharingUsingBfcp = value
            clone.__updateable__ = ['AllowPresentationSharingUsingBfcp']
            clone.update()
            self.AllowPresentationSharingUsingBfcp = value
        else:
            sqlutils = AXLSQLUtils(self.__configname__)
            sqlutils.update_bfcp(self._uuid, value)