~unity-greeter-team/unity-greeter/16.04

« back to all changes in this revision

Viewing changes to src/remote-login-service.vala

  • Committer: Michael Terry
  • Date: 2012-08-28 13:38:05 UTC
  • mfrom: (542.1.1 unity-greeter)
  • Revision ID: michael.terry@canonical.com-20120828133805-x8rg6zggkw6z1d9p
Revert "remove dead code" by Robert

This is needed to match dbus API of the methods

Otherwise you get

[+18.36s] CRITICAL: g_variant_get_variant: assertion `g_variant_is_of_type (value, G_VARIANT_TYPE_VARIANT)' failed
[+18.36s] CRITICAL: g_variant_iter_loop: assertion `g_variant_is_of_type (GVSI(iter)->value, G_VARIANT_TYPE_ARRAY)' failed
[+18.36s] CRITICAL: g_variant_get_variant: assertion `g_variant_is_of_type (value, G_VARIANT_TYPE_VARIANT)' failed
[+18.36s] CRITICAL: g_variant_iter_loop: assertion `g_variant_is_of_type (GVSI(iter)->value, G_VARIANT_TYPE_ARRAY)' failed
[+18.36s] CRITICAL: g_variant_get_variant: assertion `g_variant_is_of_type (value, G_VARIANT_TYPE_VARIANT)' failed
[+18.36s] CRITICAL: g_variant_iter_loop: assertion `g_variant_is_of_type (GVSI(iter)->value, G_VARIANT_TYPE_ARRAY)' failed

But with the unused DBus bits back, you get warnings, which Robert was trying
to avoid.  So mark those DBus structs as protected to shut the compiler up,
and fix some array usage that vala does not allow on public/protected fields.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 *
17
17
 */
18
18
 
19
 
struct RemoteServerField
 
19
protected struct RemoteServerField
20
20
{
21
21
    public string type;
 
22
    public bool required;
22
23
    public Variant default_value;
23
24
    public HashTable<string, Variant> properties;
24
25
}
25
26
 
26
 
struct RemoteServer
 
27
protected struct RemoteServerApplication
 
28
{
 
29
    public string application_id;
 
30
    public int pin_position;
 
31
}
 
32
 
 
33
protected struct RemoteServer
27
34
{
28
35
    public string type;
29
36
    public string name;
30
37
    public string url;
31
38
    public bool last_used_server;
32
39
    public RemoteServerField[] fields;
 
40
    public RemoteServerApplication[] applications;
33
41
}
34
42
 
35
43
[DBus (name = "com.canonical.RemoteLogin")]