projects
/
cascardo
/
gnio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change to using enums for g_socket_new
[cascardo/gnio.git]
/
gnio
/
gsocket.h
diff --git
a/gnio/gsocket.h
b/gnio/gsocket.h
index
63295e1
..
0affe7c
100644
(file)
--- a/
gnio/gsocket.h
+++ b/
gnio/gsocket.h
@@
-55,9
+55,23
@@
struct _GSocketClass
GObjectClass parent_class;
};
GObjectClass parent_class;
};
+typedef enum
+{
+ G_SOCKET_DOMAIN_INET,
+ G_SOCKET_DOMAIN_INET6,
+ G_SOCKET_DOMAIN_UNIX
+} GSocketDomain;
+
+typedef enum
+{
+ G_SOCKET_TYPE_STREAM,
+ G_SOCKET_TYPE_DATAGRAM,
+ G_SOCKET_TYPE_SEQPACKET
+} GSocketType;
+
GType g_socket_get_type (void) G_GNUC_CONST;
GType g_socket_get_type (void) G_GNUC_CONST;
-GSocket * g_socket_new (
gint domain, gint type, gint protocol
);
+GSocket * g_socket_new (
GSocketDomain domain, GSocketType type, const gchar *protocol, GError **error
);
GSocket * g_socket_new_from_fd (gint fd);
GSocket * g_socket_new_from_fd (gint fd);