去除无用接口

This commit is contained in:
luoxueyi 2021-10-30 18:15:14 +08:00
parent ae90e8ea46
commit f94165c962
1 changed files with 4 additions and 17 deletions

View File

@ -204,25 +204,16 @@ class UpdateManagerDbusController(dbus.service.Object):
logging.error(False, str(e)) logging.error(False, str(e))
return (False, str(e)) return (False, str(e))
# # 操作数据库的接口
# @dbus.service.method(UPDATER_DBUS_INTERFACE, out_signature='b')
# def DataBaseOpt(self, action='check',table='', cid=19):
# if action == 'check':
# try:
# self.parent.sqlite3_server.find_msg_from_datebase(action, table, cid)
# except Exception as e:
# logging.error(str(e))
# return False
# return True
# dbus接口向数据库display表中插入数据 # dbus接口向数据库display表中插入数据
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='ss', sender_keyword='sender') @dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='ss', sender_keyword='sender')
def InsertInstallState(self, item, value, sender=None): def InsertInstallState(self, item, value, sender=None):
try: try:
self.parent.sqlite3_server.insert_into_display(item, value) self.parent.sqlite3_server.insert_into_display(item, value)
logging.info("Database inserted successfullyoptions%svalue%s" % (item, value)) logging.info("Database inserted successfullyoptions%svalue%s" % (item, value))
return True
except Exception as e: except Exception as e:
logging.error("Database insert failedoptions%svalue%s" % (item, value)) logging.error("Database insert failedoptions%svalue%s" % (item, value))
return False
# # download certain package and its dependencies # # download certain package and its dependencies
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='asi', out_signature='b') @dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='asi', out_signature='b')
@ -238,9 +229,7 @@ class UpdateManagerDbusController(dbus.service.Object):
times -= 1 times -= 1
return True return True
# # # dbus接口改变apt下载速度
# dbus接口改变apt下载速度
#
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='sb') @dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='sb')
def SetDownloadspeedMax(self, speed, set): def SetDownloadspeedMax(self, speed, set):
if set: if set:
@ -255,9 +244,7 @@ class UpdateManagerDbusController(dbus.service.Object):
else: else:
return False return False
# # # dbus接口获取apt下载速度
# dbus接口获取apt下载速度
#
@dbus.service.method(UPDATER_DBUS_INTERFACE, out_signature='bs') @dbus.service.method(UPDATER_DBUS_INTERFACE, out_signature='bs')
def GetDownloadspeedLimitValue(self): def GetDownloadspeedLimitValue(self):
try: try: