~unity8-desktop-session-team/indicator-session/indicator-session-using-upstart

« back to all changes in this revision

Viewing changes to src/users.c

  • Committer: Charles Kerr
  • Date: 2013-06-25 16:16:34 UTC
  • mto: This revision was merged to the branch mainline in revision 399.
  • Revision ID: charles.kerr@canonical.com-20130625161634-ht9ef3n5s63rnmmr
in IndicatorSessionUsers, use the uid as the user's key. Users.ActivateUser is now green.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
                                      G_SIGNAL_RUN_LAST,
76
76
                                      G_STRUCT_OFFSET (IndicatorSessionUsersClass, user_added),
77
77
                                      NULL, NULL,
78
 
                                      g_cclosure_marshal_VOID__STRING,
79
 
                                      G_TYPE_NONE, 1, G_TYPE_STRING);
 
78
                                      g_cclosure_marshal_VOID__UINT,
 
79
                                      G_TYPE_NONE, 1, G_TYPE_UINT);
80
80
 
81
81
  signals[USER_REMOVED] = g_signal_new (INDICATOR_SESSION_USERS_SIGNAL_USER_REMOVED,
82
82
                                        G_TYPE_FROM_CLASS(klass),
83
83
                                        G_SIGNAL_RUN_LAST,
84
84
                                        G_STRUCT_OFFSET (IndicatorSessionUsersClass, user_removed),
85
85
                                        NULL, NULL,
86
 
                                        g_cclosure_marshal_VOID__STRING,
87
 
                                        G_TYPE_NONE, 1, G_TYPE_STRING);
 
86
                                        g_cclosure_marshal_VOID__UINT,
 
87
                                        G_TYPE_NONE, 1, G_TYPE_UINT);
88
88
 
89
89
  signals[USER_CHANGED] = g_signal_new (INDICATOR_SESSION_USERS_SIGNAL_USER_CHANGED,
90
90
                                        G_TYPE_FROM_CLASS(klass),
91
91
                                        G_SIGNAL_RUN_LAST,
92
92
                                        G_STRUCT_OFFSET (IndicatorSessionUsersClass, user_changed),
93
93
                                        NULL, NULL,
94
 
                                        g_cclosure_marshal_VOID__STRING,
95
 
                                        G_TYPE_NONE, 1, G_TYPE_STRING);
 
94
                                        g_cclosure_marshal_VOID__UINT,
 
95
                                        G_TYPE_NONE, 1, G_TYPE_UINT);
96
96
 
97
97
 
98
98
  properties[PROP_IS_LIVE_SESSION] =
115
115
****  Virtual Functions
116
116
***/
117
117
 
118
 
GStrv
119
 
indicator_session_users_get_keys (IndicatorSessionUsers * self)
 
118
GList *
 
119
indicator_session_users_get_uids (IndicatorSessionUsers * self)
120
120
{
121
121
  g_return_val_if_fail (INDICATOR_IS_SESSION_USERS (self), NULL);
122
122
 
123
 
  return INDICATOR_SESSION_USERS_GET_CLASS (self)->get_keys (self);
 
123
  return INDICATOR_SESSION_USERS_GET_CLASS (self)->get_uids (self);
124
124
}
125
125
 
126
126
IndicatorSessionUser *
127
127
indicator_session_users_get_user (IndicatorSessionUsers * self,
128
 
                                  const char            * key)
 
128
                                  guint                   uid)
129
129
{
130
130
  g_return_val_if_fail (INDICATOR_IS_SESSION_USERS (self), NULL);
131
131
 
132
 
  return INDICATOR_SESSION_USERS_GET_CLASS (self)->get_user (self, key);
 
132
  return INDICATOR_SESSION_USERS_GET_CLASS (self)->get_user (self, uid);
133
133
}
134
134
 
135
135
void
136
136
indicator_session_users_activate_user (IndicatorSessionUsers * self, 
137
 
                                       const char            * key)
 
137
                                       guint                   uid)
138
138
{
139
139
  g_return_if_fail (INDICATOR_IS_SESSION_USERS (self));
140
140
 
141
 
  INDICATOR_SESSION_USERS_GET_CLASS (self)->activate_user (self, key);
 
141
  INDICATOR_SESSION_USERS_GET_CLASS (self)->activate_user (self, uid);
142
142
}
143
143
 
144
144
gboolean
165
165
***/
166
166
 
167
167
void
168
 
indicator_session_users_added (IndicatorSessionUsers * self, const char * key)
169
 
{
170
 
  g_return_if_fail (INDICATOR_IS_SESSION_USERS (self));
171
 
 
172
 
  g_signal_emit (self, signals[USER_ADDED], 0, key);
173
 
}
174
 
 
175
 
void
176
 
indicator_session_users_removed (IndicatorSessionUsers * self, const char * key)
177
 
{
178
 
  g_return_if_fail (INDICATOR_IS_SESSION_USERS (self));
179
 
 
180
 
  g_signal_emit (self, signals[USER_REMOVED], 0, key);
181
 
}
182
 
 
183
 
void
184
 
indicator_session_users_changed (IndicatorSessionUsers * self, const char * key)
185
 
{
186
 
  g_return_if_fail (INDICATOR_IS_SESSION_USERS (self));
187
 
 
188
 
  g_signal_emit (self, signals[USER_CHANGED], 0, key);
 
168
indicator_session_users_added (IndicatorSessionUsers * self, guint uid)
 
169
{
 
170
  g_return_if_fail (INDICATOR_IS_SESSION_USERS (self));
 
171
 
 
172
  g_signal_emit (self, signals[USER_ADDED], 0, uid);
 
173
}
 
174
 
 
175
void
 
176
indicator_session_users_removed (IndicatorSessionUsers * self, guint uid)
 
177
{
 
178
  g_return_if_fail (INDICATOR_IS_SESSION_USERS (self));
 
179
 
 
180
  g_signal_emit (self, signals[USER_REMOVED], 0, uid);
 
181
}
 
182
 
 
183
void
 
184
indicator_session_users_changed (IndicatorSessionUsers * self, guint uid)
 
185
{
 
186
  g_return_if_fail (INDICATOR_IS_SESSION_USERS (self));
 
187
 
 
188
  g_signal_emit (self, signals[USER_CHANGED], 0, uid);
189
189
}
190
190
 
191
191
void