Initial client library rewrite, connects to remote server already.
[silc.git] / lib / silcclient / client_attrs.c
index fc0821da6ee1268690ec88e29f023ca95909f932..207e34eb5995e2eca9f49ec1d96d1af672cca522 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2002 - 2004 Pekka Riikonen
+  Copyright (C) 2002 - 2004, 2006 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 */
 /* $Id$ */
 
-#include "silcincludes.h"
+#include "silc.h"
 #include "silcclient.h"
 #include "client_internal.h"
 
@@ -74,10 +74,9 @@ static void silc_client_attributes_process_foreach(void *key, void *context,
 /* Process list of attributes.  Returns reply to the requested attributes. */
 
 SilcBuffer silc_client_attributes_process(SilcClient client,
-                                         SilcSocketConnection sock,
+                                         SilcClientConnection conn,
                                          SilcDList attrs)
 {
-  SilcClientConnection conn = sock->user_data;
   SilcBuffer buffer = NULL;
   SilcAttrForeach f;
   SilcAttribute attribute;
@@ -184,12 +183,12 @@ static void silc_client_attribute_del_foreach(void *key, void *context,
 
 /* Delete one attribute */
 
-bool silc_client_attribute_del(SilcClient client,
+SilcBool silc_client_attribute_del(SilcClient client,
                               SilcClientConnection conn,
                               SilcAttribute attribute,
                               SilcAttributePayload attr)
 {
-  bool ret;
+  SilcBool ret;
 
   if (!conn->internal->attrs)
     return FALSE;
@@ -218,10 +217,10 @@ bool silc_client_attribute_del(SilcClient client,
 
 /* Return all attributes */
 
-const SilcHashTable silc_client_attributes_get(SilcClient client,
-                                              SilcClientConnection conn)
+SilcHashTable silc_client_attributes_get(SilcClient client,
+                                        SilcClientConnection conn)
 {
-  return (const SilcHashTable)conn->internal->attrs;
+  return conn->internal->attrs;
 }
 
 /* Construct a Requested Attributes buffer. If the `attribute' is zero (0)