Skip to content

Commit 39cc7db

Browse files
committed
Add CanTTY property to login1 test interface
1 parent fa22cb5 commit 39cc7db

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/src/test-runner.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ typedef struct
128128
gchar *path;
129129
gboolean can_graphical;
130130
gboolean can_multi_session;
131+
gboolean can_tty;
131132
gchar *active_session;
132133
} Login1Seat;
133134

@@ -1555,6 +1556,8 @@ handle_login1_seat_get_property (GDBusConnection *connection,
15551556
return g_variant_new_boolean (seat->can_graphical);
15561557
else if (strcmp (property_name, "CanMultiSession") == 0)
15571558
return g_variant_new_boolean (seat->can_multi_session);
1559+
else if (strcmp (property_name, "CanTTY") == 0)
1560+
return g_variant_new_boolean (seat->can_tty);
15581561
else if (strcmp (property_name, "Id") == 0)
15591562
return g_variant_new_string (seat->id);
15601563
else if (strcmp (property_name, "ActiveSession") == 0)
@@ -1580,13 +1583,15 @@ add_login1_seat (GDBusConnection *connection, const gchar *id, gboolean emit_sig
15801583
seat->path = g_strdup_printf ("/org/freedesktop/login1/seat/%s", seat->id);
15811584
seat->can_graphical = TRUE;
15821585
seat->can_multi_session = TRUE;
1586+
seat->can_tty = TRUE;
15831587
seat->active_session = NULL;
15841588

15851589
const gchar *login1_seat_interface =
15861590
"<node>"
15871591
" <interface name='org.freedesktop.login1.Seat'>"
15881592
" <property name='CanGraphical' type='b' access='read'/>"
15891593
" <property name='CanMultiSession' type='b' access='read'/>"
1594+
" <property name='CanTTY' type='b' access='read'/>"
15901595
" <property name='ActiveSession' type='(so)' access='read'/>"
15911596
" <property name='Id' type='s' access='read'/>"
15921597
" </interface>"

0 commit comments

Comments
 (0)