/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2015-08-02 09:36:40 UTC
  • Revision ID: teddy@recompile.se-20150802093640-nc0n17rbmqlbaxuf
Add D-Bus annotations on a few properties on the Client object.

The D-Bus property "Secret" on the interface
"se.recompile.Mandos.Client" should have the annotation
"org.freedesktop.DBus.Property.EmitsChangedSignal" set to
"invalidates".  Also, the properties "Created", "Fingerprint", "Name",
and "ObjectPath" should have the same annotation set to "const".

* mandos (ClientDBus.Name_dbus_property): Set annotation
                    "org.freedesktop.DBus.Property.EmitsChangedSignal"
                    to "const".
  (ClientDBus.Fingerprint_dbus_property): - '' -
  (ClientDBus.Created_dbus_property): - '' -
  (ClientDBus.ObjectPath_dbus_property): - '' -
  (ClientDBus.Secret_dbus_property): Set annotation
                    "org.freedesktop.DBus.Property.EmitsChangedSignal"
                    to "invalidates".

Show diffs side-by-side

added added

removed removed

Lines of Context:
1524
1524
        self.approval_duration = datetime.timedelta(0, 0, 0, value)
1525
1525
    
1526
1526
    # Name - property
 
1527
    @dbus_annotations(
 
1528
        {"org.freedesktop.DBus.Property.EmitsChangedSignal": "const"})
1527
1529
    @dbus_service_property(_interface, signature="s", access="read")
1528
1530
    def Name_dbus_property(self):
1529
1531
        return dbus.String(self.name)
1530
1532
    
1531
1533
    # Fingerprint - property
 
1534
    @dbus_annotations(
 
1535
        {"org.freedesktop.DBus.Property.EmitsChangedSignal": "const"})
1532
1536
    @dbus_service_property(_interface, signature="s", access="read")
1533
1537
    def Fingerprint_dbus_property(self):
1534
1538
        return dbus.String(self.fingerprint)
1543
1547
        self.host = str(value)
1544
1548
    
1545
1549
    # Created - property
 
1550
    @dbus_annotations(
 
1551
        {"org.freedesktop.DBus.Property.EmitsChangedSignal": "const"})
1546
1552
    @dbus_service_property(_interface, signature="s", access="read")
1547
1553
    def Created_dbus_property(self):
1548
1554
        return datetime_to_dbus(self.created)
1663
1669
            self.stop_checker()
1664
1670
    
1665
1671
    # ObjectPath - property
 
1672
    @dbus_annotations(
 
1673
        {"org.freedesktop.DBus.Property.EmitsChangedSignal": "const"})
1666
1674
    @dbus_service_property(_interface, signature="o", access="read")
1667
1675
    def ObjectPath_dbus_property(self):
1668
1676
        return self.dbus_object_path # is already a dbus.ObjectPath
1669
1677
    
1670
1678
    # Secret = property
 
1679
    @dbus_annotations(
 
1680
        {"org.freedesktop.DBus.Property.EmitsChangedSignal":
 
1681
         "invalidates"})
1671
1682
    @dbus_service_property(_interface,
1672
1683
                           signature="ay",
1673
1684
                           access="write",