mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-03 07:53:39 +02:00
Remove protocol names, instead use an enum with common protocols
The whole protocol name thing is pretty weird. The getprotobyname functions seem to only specify one mapping for name <-> ids, so all families/types must use the same values. Plus the values used for the protocols are standardized by IANA, so are always the same. So, we drop using names for protocols, intead introducing an enum with a few commonly availible and used protocols.
This commit is contained in:
@@ -76,15 +76,14 @@ struct _GSocket
|
||||
GType g_socket_get_type (void) G_GNUC_CONST;
|
||||
GSocket * g_socket_new (GSocketFamily family,
|
||||
GSocketType type,
|
||||
gint protocol_id,
|
||||
GSocketProtocol protocol,
|
||||
GError **error);
|
||||
GSocket * g_socket_new_from_fd (gint fd,
|
||||
GError **error);
|
||||
int g_socket_get_fd (GSocket *socket);
|
||||
GSocketFamily g_socket_get_family (GSocket *socket);
|
||||
GSocketType g_socket_get_socket_type (GSocket *socket);
|
||||
gint g_socket_get_protocol_id (GSocket *socket);
|
||||
char * g_socket_get_protocol_name (GSocket *socket);
|
||||
GSocketProtocol g_socket_get_protocol (GSocket *socket);
|
||||
GSocketAddress * g_socket_get_local_address (GSocket *socket,
|
||||
GError **error);
|
||||
GSocketAddress * g_socket_get_remote_address (GSocket *socket,
|
||||
@@ -163,8 +162,6 @@ GSource * g_socket_create_source (GSocket
|
||||
GIOCondition condition,
|
||||
GCancellable *cancellable);
|
||||
|
||||
gint g_socket_protocol_id_lookup_by_name (const char *protocol_name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SOCKET_H__ */
|
||||
|
Reference in New Issue
Block a user