Change to using enums for g_socket_new
[cascardo/gnio.git] / gnio / gsocket.h
index 63295e1..0affe7c 100644 (file)
@@ -55,9 +55,23 @@ struct _GSocketClass
   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;
 
-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);