5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
27 import dbus.mainloop.glib
30 class AutoSnap(dbus.service.Object):
32 D-Bus object for Time Slider's auto snapshot features.
34 def __init__(self, bus, path, snapshotmanager):
35 self.snapshotmanager = snapshotmanager
37 dbus.service.Object.__init__(self,
41 # Remedial cleanup signal
42 @dbus.service.signal(dbus_interface="org.opensolaris.TimeSlider.autosnap",
44 def capacity_exceeded(self, pool, severity, threshhold):
47 class RsyncBackup(dbus.service.Object):
49 D-Bus object for Time Slider's rsync backup feature.
51 def __init__(self, bus, path):
53 dbus.service.Object.__init__(self,
57 # Rsync operation rsync_started signal
58 @dbus.service.signal(dbus_interface="org.opensolaris.TimeSlider.plugin.rsync",
60 def rsync_started(self, target):
63 # Rsync operation rsync_current signal
64 @dbus.service.signal(dbus_interface="org.opensolaris.TimeSlider.plugin.rsync",
66 def rsync_current(self, snapshot, remaining):
69 # Rsync operation rsync_complete signal
70 @dbus.service.signal(dbus_interface="org.opensolaris.TimeSlider.plugin.rsync",
72 def rsync_complete(self, target):
75 # Rsync operation rsync_synced signal
76 @dbus.service.signal(dbus_interface="org.opensolaris.TimeSlider.plugin.rsync",
78 def rsync_synced(self):
81 # Rsync operation rsync_unsynced signal
82 @dbus.service.signal(dbus_interface="org.opensolaris.TimeSlider.plugin.rsync",
84 def rsync_unsynced(self, queueSize):
88 class Config(dbus.service.Object):
90 D-Bus object representing Time Slider service configuration changes.
92 def __init__(self, bus, path):
94 dbus.service.Object.__init__(self,
97 # Service configuration change signal. Nothing fancy for now.
98 # Listeners need to figure out what changed for themselves.
99 @dbus.service.signal(dbus_interface="org.opensolaris.TimeSlider.config",
101 def config_changed(self):