Skip to content
Snippets Groups Projects
Commit 49c6d00e authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

session: add a _get_name() method

parent 27064d78
No related branches found
No related tags found
No related merge requests found
......@@ -401,6 +401,23 @@ wp_session_class_init (WpSessionClass * klass)
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
}
/**
* wp_session_get_name:
* @self: the session
*
* Returns: (transfer none): the (unique) name of the session
*/
const gchar *
wp_session_get_name (WpSession * self)
{
g_return_val_if_fail (WP_IS_SESSION (self), NULL);
g_return_val_if_fail (wp_proxy_get_features (WP_PROXY (self)) &
WP_PROXY_FEATURE_INFO, NULL);
WpSessionPrivate *priv = wp_session_get_instance_private (self);
return wp_properties_get (priv->properties, "session.name");
}
/**
* wp_session_get_default_endpoint:
* @self: the session
......
......@@ -61,6 +61,9 @@ struct _WpSessionClass
guint32 id);
};
WP_API
const gchar * wp_session_get_name (WpSession * self);
WP_API
guint32 wp_session_get_default_endpoint (WpSession * self,
const gchar * id_name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment