Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

interface extending Properties could call Properties methods in 0.7, but not 0.8 #34

Open
smcv opened this issue May 12, 2014 · 0 comments

Comments

@smcv
Copy link

smcv commented May 12, 2014

If I have this code:

[Interface("org.freedesktop.hostname1")]
interface IHostname1 : Introspectable, Properties
{
    void SetHostname (string name, bool userInteraction);
    void SetStaticHostname (string name, bool userInteraction);
    void SetPrettyHostname (string name, bool userInteraction);
    void SetIconName (string name, bool userInteraction);
    void SetChassis (string name, bool userInteraction);

    string Hostname { get; }
    string StaticHostname { get; }
    string PrettyHostname { get; }
    string IconName { get; }
    string Chassis { get; }
}

and compile it against dbus-sharp 0.7 on Debian 7, I can do this to get an org.freedesktop.DBus.Properties.GetAll call:

IHostname1 hostnamed = Bus.System.GetObject<IHostname1>(HOSTNAME1_NAME, HOSTNAME1_PATH);
IDictionary<string,object> asv;
asv = hostnamed.GetAll (HOSTNAME1_IFACE);

Under 0.8 or git master, this tries to call org.freedesktop.hostname1.GetAll which doesn't exist. (Or am I meant to do a separate GetObject call for the Properties interface to achieve that?)

arfbtwn added a commit to arfbtwn/dbus-sharp that referenced this issue Aug 20, 2014
Issue mono#34 reports that only the main interface is presented, so that if
e.g. a programmer wishes to add the properties interface to a type, then
the resulting implementation attempts to call the method on the
incorrect interface.

This is due to a premature optimisation, which this patch removes.
arfbtwn added a commit to arfbtwn/dbus-sharp that referenced this issue Nov 16, 2014
Issue mono#34 reports that only the main interface is presented, so that if
e.g. a programmer wishes to add the properties interface to a type, then
the resulting implementation attempts to call the method on the
incorrect interface.

This is due to a premature optimisation, which this patch removes.
arfbtwn added a commit to arfbtwn/dbus-sharp that referenced this issue Feb 15, 2015
Issue mono#34 reports that only the main interface is presented, so that if
e.g. a programmer wishes to add the properties interface to a type, then
the resulting implementation attempts to call the method on the
incorrect interface.

This is due to a premature optimisation, which this patch removes.
arfbtwn added a commit to arfbtwn/dbus-sharp that referenced this issue Feb 22, 2015
Issue mono#34 reports that only the main interface is presented, so that if
e.g. a programmer wishes to add the properties interface to a type, then
the resulting implementation attempts to call the method on the
incorrect interface.

This is due to a premature optimisation, which this patch removes.
steffen-kiess added a commit to steffen-kiess/dbus-sharp that referenced this issue Jun 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant