Bug 49616 - [next] consider grouping some properties in a GVariant
Summary: [next] consider grouping some properties in a GVariant
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: git master
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-07 23:53 UTC by Guillaume Desmottes
Modified: 2019-12-03 20:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2012-05-07 23:53:29 UTC
See bug #47100 for the original background.

Some TpAccount properties (but this probably apply for other objects) are split into different GObject properties while they are conceptually the same thing or are at least tightly connected. The main "problem" is tracking changes of these properties as we may need to connect different "notify" signals rather than one and aggregate the current value of all the properties manually.

Now that we have a proper API (and easier to use than GValueArray) to represent them, may we should consider merging them into a single GVariant.

In TpAccount this could lead to something like:
- automatic-presence (uss)
- connection-error (sa{sv})
- current-presence (uss)
- requested-presence (uss)
Comment 1 Xavier Claessens 2012-05-08 00:14:59 UTC
For *-presence, I would rather have

typedef struct {
  TpConnectionPresenceType type;
  gchar *status;
  gchar *message;
} TpPresence;

Much more convenient that even a GVariant.

For connection-error and connection-error-detailed seems like something we added for compat and could be reduced to only the -detailed in next (as a GVariant of course).
Comment 2 Guillaume Desmottes 2012-05-08 00:19:19 UTC
That means we'd have to define a boxed type for this struct right? Is that binding friendly?
Comment 3 Xavier Claessens 2012-05-08 00:22:18 UTC
Yep, should be fine with a boxed, AFAIK.
Comment 4 GitLab Migration User 2019-12-03 20:40:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-glib/issues/93.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.