Bug 617483 – Credentials passing

- Make GCredentials instance and class structures private so it can't
   be subclassed and we don't have to worry about ABI compat
   issues. This also allows us to get rid of the GCredentialsPrivate
   struct.

 - Add a GCredentialsType enumeration that is used whenever exchanging
   pointers with the user. This allows us to support OSes with
   multiple native credential types. In particular, it allows
   supporting OSes where the native credential evolves or even changes
   over time.

 - Add g_socket_get_credentials() method.

 - Add tests for g_socket_get_credentials(). Right now this is in the
   GDBus peer-to-peer test case but we can change that later.

 - Move GTcpConnection into a separate gtk-doc page as was already
   half-done with GUnixConnection. Also finish the GUnixConnection
   move and ensure send_credentials() and receive_credentials()
   methods are in the docs. Also nuke comment about GTcpConnection
   being empty compared to its superclass.

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2010-07-20 14:02:14 -04:00
parent b3cf5cbd0b
commit 7eba41346e
13 changed files with 274 additions and 117 deletions

View File

@@ -1741,6 +1741,7 @@ g_socket_get_protocol
g_socket_get_remote_address
g_socket_get_socket_type
g_socket_speaks_ipv4
g_socket_get_credentials
<SUBSECTION Standard>
GSocketClass
G_IS_SOCKET
@@ -1797,16 +1798,6 @@ g_socket_connection_get_local_address
g_socket_connection_get_remote_address
g_socket_connection_get_socket
<SUBSECTION>
GTcpConnection
g_tcp_connection_set_graceful_disconnect
g_tcp_connection_get_graceful_disconnect
<SUBSECTION>
GUnixConnection
g_unix_connection_receive_fd
g_unix_connection_send_fd
g_unix_connection_receive_credentials
g_unix_connection_send_credentials
<SUBSECTION>
g_socket_connection_factory_create_connection
g_socket_connection_factory_lookup_type
g_socket_connection_factory_register_type
@@ -1818,18 +1809,9 @@ G_SOCKET_CONNECTION
G_SOCKET_CONNECTION_CLASS
G_SOCKET_CONNECTION_GET_CLASS
G_TYPE_SOCKET_CONNECTION
GTcpConnectionClass
G_IS_TCP_CONNECTION
G_IS_TCP_CONNECTION_CLASS
G_TCP_CONNECTION
G_TCP_CONNECTION_CLASS
G_TCP_CONNECTION_GET_CLASS
G_TYPE_TCP_CONNECTION
<SUBSECTION Private>
GSocketConnectionPrivate
g_socket_connection_get_type
GTcpConnectionPrivate
g_tcp_connection_get_type
</SECTION>
<SECTION>
@@ -1838,6 +1820,8 @@ g_tcp_connection_get_type
GUnixConnection
g_unix_connection_receive_fd
g_unix_connection_send_fd
g_unix_connection_receive_credentials
g_unix_connection_send_credentials
<SUBSECTION Standard>
GUnixConnectionClass
G_IS_UNIX_CONNECTION
@@ -1851,6 +1835,25 @@ GUnixConnectionPrivate
g_unix_connection_get_type
</SECTION>
<SECTION>
<FILE>gtcpconnection</FILE>
<TITLE>GTcpConnection</TITLE>
GTcpConnection
g_tcp_connection_set_graceful_disconnect
g_tcp_connection_get_graceful_disconnect
<SUBSECTION Standard>
GTcpConnectionClass
G_IS_TCP_CONNECTION
G_IS_TCP_CONNECTION_CLASS
G_TYPE_TCP_CONNECTION
G_TCP_CONNECTION
G_TCP_CONNECTION_CLASS
G_TCP_CONNECTION_GET_CLASS
<SUBSECTION Private>
GTcpConnectionPrivate
g_tcp_connection_get_type
</SECTION>
<SECTION>
<FILE>gsocketcontrolmessage</FILE>
<TITLE>GSocketControlMessage</TITLE>
@@ -2210,7 +2213,7 @@ g_unix_credentials_message_get_type
<FILE>gcredentials</FILE>
<TITLE>GCredentials</TITLE>
GCredentials
GCredentialsClass
GCredentialsType
g_credentials_new
g_credentials_to_string
g_credentials_get_native