g_object_get (G_OBJECT (conn), "accepted-cas", &accepted_cas, NULL);
return accepted_cas;
}
+
+/**
+ * g_tls_client_connection_copy_session_state:
+ * @conn: a #GTlsClientConnection
+ * @other: a #GTlsClientConnection
+ *
+ * Copies session state from one connection to another. This is
+ * not normally needed, but may be used when the same session
+ * needs to be used between different endpoints as is required
+ * by some protocols such as FTP over TLS. @source should have
+ * already completed a handshake, and @conn should not have
+ * completed a handshake.
+ *
+ * Since: 2.46
+ */
+void
+g_tls_client_connection_copy_session_state (GTlsClientConnection *conn,
+ GTlsClientConnection *source)
+{
+ g_return_if_fail (G_IS_TLS_CLIENT_CONNECTION (conn));
+ g_return_if_fail (G_IS_TLS_CLIENT_CONNECTION (source));
+ g_return_if_fail (G_TLS_CLIENT_CONNECTION_GET_INTERFACE (conn)->copy_session_state != NULL);
+
+ G_TLS_CLIENT_CONNECTION_GET_INTERFACE (conn)->copy_session_state (conn,
+ source);
+}
{
GTypeInterface g_iface;
+ void ( *copy_session_state ) (GTlsClientConnection *conn,
+ GTlsClientConnection *source);
};
GLIB_AVAILABLE_IN_ALL
GLIB_AVAILABLE_IN_ALL
GList * g_tls_client_connection_get_accepted_cas (GTlsClientConnection *conn);
+GLIB_AVAILABLE_IN_2_46
+void g_tls_client_connection_copy_session_state (GTlsClientConnection *conn,
+ GTlsClientConnection *source);
+
G_END_DECLS
#endif /* __G_TLS_CLIENT_CONNECTION_H__ */