On Mon, 2018-04-09 at 17:45 +0200, Pavel Hrdina wrote: > On Mon, Apr 09, 2018 at 05:10:48PM +0200, Katerina Koukiou wrote: > > In C and XML files the order is: > > 1) properties > > 2) methods > > 3) signals > > All of them sorted in their category alphabetically. > > > > Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx> > > --- > > data/org.libvirt.Connect.xml | 12 +-- > > data/org.libvirt.Domain.xml | 54 ++++++------ > > src/connect.c | 2 +- > > src/domain.c | 200 +++++++++++++++++++++-------- > > -------------- > > 4 files changed, 134 insertions(+), 134 deletions(-) > > I would split it into two patches, one per each file to make the diff > less crazy. I'm also considering to split it per every > property/method > move to make the diff clean and obvious that it's a simple > move. It's > easy to miss something. Ok I 'll split per property/method and repost. I agree the patch is not readable. > > > diff --git a/data/org.libvirt.Connect.xml > > b/data/org.libvirt.Connect.xml > > index 5b49ed9..55260cc 100644 > > --- a/data/org.libvirt.Connect.xml > > +++ b/data/org.libvirt.Connect.xml > > @@ -25,12 +25,6 @@ > > <annotation name="org.gtk.GDBus.DocString" > > value="See https://libvirt.org/html/libvirt-libvirt-host.h > > tml#virConnectGetVersion"/>; > > </property> > > - <method name="ListDomains"> > > - <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virConnectListAllDomains"/>; > > - <arg name="flags" type="u" direction="in"/> > > - <arg name="domains" type="ao" direction="out"/> > > - </method> > > <method name="DomainCreateXML"> > > <annotation name="org.gtk.GDBus.DocString" > > value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainCreateXML"/>; > > @@ -73,6 +67,12 @@ > > <arg name="flags" type="u" direction="in"/> > > <arg name="sysinfo" type="s" direction="out"/> > > </method> > > + <method name="ListDomains"> > > + <annotation name="org.gtk.GDBus.DocString" > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virConnectListAllDomains"/>; > > + <arg name="flags" type="u" direction="in"/> > > + <arg name="domains" type="ao" direction="out"/> > > + </method> > > <method name="ListNetworks"> > > <annotation name="org.gtk.GDBus.DocString" > > value="See https://libvirt.org/html/libvirt-libvirt-networ > > k.html#virConnectListAllNetworks"/>; > > diff --git a/data/org.libvirt.Domain.xml > > b/data/org.libvirt.Domain.xml > > index 7679018..78378bb 100644 > > --- a/data/org.libvirt.Domain.xml > > +++ b/data/org.libvirt.Domain.xml > > @@ -3,25 +3,25 @@ > > > > <node name="/org/libvirt/domain"> > > <interface name="org.libvirt.Domain"> > > - <property name="Name" type="s" access="read"> > > + <property name="Active" type="b" access="read"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetName"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainIsActive"/>; > > </property> > > - <property name="UUID" type="s" access="read"> > > + <property name="Autostart" type="b" access="read"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetUUIDString"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetAutostart"/>; > > </property> > > <property name="Id" type="u" access="read"> > > <annotation name="org.gtk.GDBus.DocString" > > value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetID"/>; > > </property> > > - <property name="OSType" type="s" access="read"> > > + <property name="Name" type="s" access="read"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetOSType"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetName"/>; > > </property> > > - <property name="Active" type="b" access="read"> > > + <property name="OSType" type="s" access="read"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainIsActive"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetOSType"/>; > > </property> > > <property name="Persistent" type="b" access="read"> > > <annotation name="org.gtk.GDBus.DocString" > > @@ -31,21 +31,19 @@ > > <annotation name="org.gtk.GDBus.DocString" > > value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetState"/>; > > </property> > > - <property name="Autostart" type="b" access="read"> > > + <property name="UUID" type="s" access="read"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetAutostart"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetUUIDString"/>; > > </property> > > - <method name="GetVcpus"> > > + <method name="Create"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetVcpusFlags"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainCreateWithFlags"/>; > > <arg name="flags" type="u" direction="in"/> > > - <arg name="vcpus" type="u" direction="out"/> > > </method> > > - <method name="GetXMLDesc"> > > + <method name="Destroy"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetXMLDesc"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainDestroyFlags"/>; > > <arg name="flags" type="u" direction="in"/> > > - <arg name="xml" type="s" direction="out"/> > > </method> > > <method name="GetStats"> > > <annotation name="org.gtk.GDBus.DocString" > > @@ -54,15 +52,17 @@ > > <arg name="flags" type="u" direction="in"/> > > <arg name="records" type="a{sv}" direction="out"/> > > </method> > > - <method name="Shutdown"> > > + <method name="GetVcpus"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainShutdownFlags"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetVcpusFlags"/>; > > <arg name="flags" type="u" direction="in"/> > > + <arg name="vcpus" type="u" direction="out"/> > > </method> > > - <method name="Destroy"> > > + <method name="GetXMLDesc"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainDestroyFlags"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainGetXMLDesc"/>; > > <arg name="flags" type="u" direction="in"/> > > + <arg name="xml" type="s" direction="out"/> > > </method> > > <method name="Reboot"> > > <annotation name="org.gtk.GDBus.DocString" > > @@ -74,23 +74,23 @@ > > value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainReset"/>; > > <arg name="flags" type="u" direction="in"/> > > </method> > > - <method name="Create"> > > + <method name="Resume"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainCreateWithFlags"/>; > > - <arg name="flags" type="u" direction="in"/> > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainResume"/>; > > </method> > > - <method name="Undefine"> > > + <method name="Shutdown"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainUndefineFlags"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainShutdownFlags"/>; > > <arg name="flags" type="u" direction="in"/> > > </method> > > <method name="Suspend"> > > <annotation name="org.gtk.GDBus.DocString" > > value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainSuspend"/>; > > </method> > > - <method name="Resume"> > > + <method name="Undefine"> > > <annotation name="org.gtk.GDBus.DocString" > > - value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainResume"/>; > > + value="See https://libvirt.org/html/libvirt-libvirt-domain > > .html#virDomainUndefineFlags"/>; > > + <arg name="flags" type="u" direction="in"/> > > </method> > > <signal name="DeviceAdded"> > > <annotation name="org.gtk.GDBus.DocString" > > diff --git a/src/connect.c b/src/connect.c > > index 9820de5..d18f77d 100644 > > --- a/src/connect.c > > +++ b/src/connect.c > > @@ -575,7 +575,6 @@ static virtDBusGDBusPropertyTable > > virtDBusConnectPropertyTable[] = { > > }; > > > > static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = { > > - { "ListDomains", virtDBusConnectListDomains }, > > { "DomainCreateXML", virtDBusConnectDomainCreateXML }, > > { "DomainDefineXML", virtDBusConnectDomainDefineXML }, > > { "DomainLookupByID", virtDBusConnectDomainLookupByID }, > > @@ -583,6 +582,7 @@ static virtDBusGDBusMethodTable > > virtDBusConnectMethodTable[] = { > > { "DomainLookupByUUID", virtDBusConnectDomainLookupByUUID }, > > { "GetCapabilities", virtDBusConnectGetCapabilities }, > > { "GetSysinfo", virtDBusConnectGetSysinfo }, > > + { "ListDomains", virtDBusConnectListDomains }, > > { "ListNetworks", virtDBusConnectListNetworks }, > > { "NetworkCreateXML", virtDBusConnectNetworkCreateXML }, > > { "NetworkDefineXML", virtDBusConnectNetworkDefineXML }, > > The function itself is not moved in this file. Otherwise looks good. > > Pavel -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list