Esempio n. 1
0
static void
gdm_xdmcp_display_class_init (GdmXdmcpDisplayClass *klass)
{
        GObjectClass    *object_class = G_OBJECT_CLASS (klass);
        GdmDisplayClass *display_class = GDM_DISPLAY_CLASS (klass);

        object_class->get_property = gdm_xdmcp_display_get_property;
        object_class->set_property = gdm_xdmcp_display_set_property;

        display_class->prepare = gdm_xdmcp_display_prepare;
        display_class->manage = gdm_xdmcp_display_manage;

        g_type_class_add_private (klass, sizeof (GdmXdmcpDisplayPrivate));

        g_object_class_install_property (object_class,
                                         PROP_REMOTE_ADDRESS,
                                         g_param_spec_boxed ("remote-address",
                                                             "Remote address",
                                                             "Remote address",
                                                             GDM_TYPE_ADDRESS,
                                                             G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));

        g_object_class_install_property (object_class,
                                         PROP_SESSION_NUMBER,
                                         g_param_spec_int ("session-number",
                                                           "session-number",
                                                           "session-number",
                                                           G_MININT,
                                                           G_MAXINT,
                                                           0,
                                                           G_PARAM_READWRITE | G_PARAM_CONSTRUCT));

}
Esempio n. 2
0
static gboolean
gdm_xdmcp_display_remove_user_authorization (GdmDisplay *display,
                                             const char *username,
                                             GError    **error)
{
        return GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->remove_user_authorization (display, username, error);
}
Esempio n. 3
0
static gboolean
gdm_xdmcp_display_create_authority (GdmDisplay *display)
{
        g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);

        return GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->create_authority (display);
}
Esempio n. 4
0
static gboolean
gdm_xdmcp_display_unmanage (GdmDisplay *display)
{
        g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);

        GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->unmanage (display);
        return TRUE;
}
Esempio n. 5
0
static gboolean
gdm_xdmcp_display_prepare (GdmDisplay *display)
{
        GdmXdmcpDisplay *self = GDM_XDMCP_DISPLAY (display);
        GdmLaunchEnvironment *launch_environment;
        char          *display_name;
        char          *seat_id;
        char          *hostname;

        launch_environment = NULL;
        display_name = NULL;
        seat_id = NULL;
        hostname = NULL;

        g_object_get (self,
                      "x11-display-name", &display_name,
                      "seat-id", &seat_id,
                      "remote-hostname", &hostname,
                      "launch-environment", &launch_environment,
                      NULL);

        if (launch_environment == NULL) {
                launch_environment = gdm_create_greeter_launch_environment (display_name,
                                                                            seat_id,
                                                                            NULL,
                                                                            hostname,
                                                                            FALSE);
                g_object_set (self, "launch-environment", launch_environment, NULL);
                g_object_unref (launch_environment);
        }

        if (!gdm_display_create_authority (display)) {
                g_warning ("Unable to set up access control for display %s",
                           display_name);
                return FALSE;
        }

        return GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->prepare (display);
}
Esempio n. 6
0
static void
gdm_xdmcp_display_class_init (GdmXdmcpDisplayClass *klass)
{
        GObjectClass    *object_class = G_OBJECT_CLASS (klass);
        GdmDisplayClass *display_class = GDM_DISPLAY_CLASS (klass);

        object_class->get_property = gdm_xdmcp_display_get_property;
        object_class->set_property = gdm_xdmcp_display_set_property;
        object_class->finalize = gdm_xdmcp_display_finalize;

        display_class->create_authority = gdm_xdmcp_display_create_authority;
        display_class->add_user_authorization = gdm_xdmcp_display_add_user_authorization;
        display_class->remove_user_authorization = gdm_xdmcp_display_remove_user_authorization;
        display_class->manage = gdm_xdmcp_display_manage;
        display_class->unmanage = gdm_xdmcp_display_unmanage;
        display_class->get_timed_login_details = gdm_xdmcp_display_get_timed_login_details;

        g_type_class_add_private (klass, sizeof (GdmXdmcpDisplayPrivate));

        g_object_class_install_property (object_class,
                                         PROP_REMOTE_ADDRESS,
                                         g_param_spec_boxed ("remote-address",
                                                             "Remote address",
                                                             "Remote address",
                                                             GDM_TYPE_ADDRESS,
                                                             G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));

        g_object_class_install_property (object_class,
                                         PROP_SESSION_NUMBER,
                                         g_param_spec_int ("session-number",
                                                           "session-number",
                                                           "session-number",
                                                           G_MININT,
                                                           G_MAXINT,
                                                           0,
                                                           G_PARAM_READWRITE | G_PARAM_CONSTRUCT));

}