Support for SILC 1.2 INVITE and BAN commands. Client supports
[silc.git] / apps / silcd / idlist.h
index d7be279188c14c3195cd86e165c9ab2fbbd1b4ee..ac67e10ad5a06cc950476c76f706d1d185828a78 100644 (file)
@@ -30,13 +30,11 @@ typedef struct SilcChannelEntryStruct *SilcChannelEntry;
    the cache. */
 typedef struct {
   SilcIDCache cache;
-  SilcSchedule schedule;
   SilcUInt32 timeout;
 } *SilcIDListPurge;
 
 /* Channel key re-key context. */
 typedef struct {
-  void *context;
   SilcChannelEntry channel;
   SilcUInt32 key_len;
   SilcTask task;
@@ -54,16 +52,20 @@ typedef struct {
   void *context;
 } *SilcServerRekey;
 
-/* ID List Entry status type and all the types. */
+/* ID List Entry status flags. */
 typedef SilcUInt8 SilcIDListStatus;
-#define SILC_IDLIST_STATUS_NONE         0x00    /* No status */
-#define SILC_IDLIST_STATUS_REGISTERED   0x01    /* Entry is registered */
-#define SILC_IDLIST_STATUS_RESOLVED     0x02    /* Entry info is resolved */
-#define SILC_IDLIST_STATUS_RESOLVING    0x04    /* Entry is being resolved
-                                                  with WHOIS or IDENTIFY */
-#define SILC_IDLIST_STATUS_DISABLED     0x08    /* Entry is disabled */
-#define SILC_IDLIST_STATUS_RESUMED      0x10    /* Entry is resumed */
-#define SILC_IDLIST_STATUS_LOCAL        0x20    /* Entry locally connected */
+#define SILC_IDLIST_STATUS_NONE         0x00  /* No status */
+#define SILC_IDLIST_STATUS_REGISTERED   0x01  /* Entry is registered */
+#define SILC_IDLIST_STATUS_RESOLVED     0x02  /* Entry info is resolved */
+#define SILC_IDLIST_STATUS_RESOLVING    0x04  /* Entry is being resolved
+                                                with WHOIS or IDENTIFY */
+#define SILC_IDLIST_STATUS_DISABLED     0x08  /* Entry is disabled */
+#define SILC_IDLIST_STATUS_RESUMED      0x10  /* Entry is resumed */
+#define SILC_IDLIST_STATUS_LOCAL        0x20  /* Entry locally connected */
+#define SILC_IDLIST_STATUS_RESUME_RES   0x40  /* Entry resolved while
+                                                resuming */
+#define SILC_IDLIST_STATUS_NOATTR       0x80  /* Entry does not support
+                                                attributes in WHOIS */
 
 /*
    Generic ID list data structure.
@@ -345,6 +347,10 @@ struct SilcClientEntryStruct {
   long last_command;
   SilcUInt8 fast_command;
 
+  /* Requested Attributes */
+  unsigned char *attrs;
+  SilcUInt16 attrs_len;
+
   /* Pointer to the router */
   SilcServerEntry router;
 
@@ -354,6 +360,9 @@ struct SilcClientEntryStruct {
   /* Connection data */
   void *connection;
 
+  /* Last time updated/accessed */
+  unsigned long updated;
+
   /* data.status is RESOLVING and this includes the resolving command 
      reply identifier. */
   SilcUInt16 resolve_cmd_ident;
@@ -467,8 +476,8 @@ struct SilcChannelEntryStruct {
 
   SilcUInt32 user_limit;
   unsigned char *passphrase;
-  char *invite_list;
-  char *ban_list;
+  SilcHashTable invite_list;
+  SilcHashTable ban_list;
 
   /* All users on this channel */
   SilcHashTable user_list;
@@ -485,6 +494,7 @@ struct SilcChannelEntryStruct {
 
   SilcServerChannelRekey rekey;
   unsigned long created;
+  unsigned long updated;
 
   /* Flags */
   unsigned int global_users : 1;