Rewrote WHOIS, WHOWAS and IDENTIFY commands.
[silc.git] / lib / silccore / silcattrs.h
index 3038c34fc29c698a5564b4e275edb991922afe0d..89e6c00a4fc18b7d44b1793e6c2b7cf0296d46e7 100644 (file)
@@ -50,7 +50,7 @@ typedef struct SilcAttributePayloadStruct *SilcAttributePayload;
  *
  * NAME
  * 
- *    typedef unsigned char SilcAttribute;
+ *    typedef SilcUInt8 SilcAttribute;
  *
  * DESCRIPTION
  *
@@ -61,7 +61,7 @@ typedef struct SilcAttributePayloadStruct *SilcAttributePayload;
  *
  * SOURCE
  */
-typedef unsigned char SilcAttribute;
+typedef SilcUInt8 SilcAttribute;
 
 /* All defined attributes.  See the specs for detailed information.  The
    comment is the structure or data type that must be used with the
@@ -88,7 +88,7 @@ typedef unsigned char SilcAttribute;
  *
  * NAME
  * 
- *    typedef unsigned char SilcAttributeFlags;
+ *    typedef SilcUInt8 SilcAttributeFlags;
  *
  * DESCRIPTION
  *
@@ -96,7 +96,7 @@ typedef unsigned char SilcAttribute;
  *
  * SOURCE
  */
-typedef unsigned char SilcAttributeFlags;
+typedef SilcUInt8 SilcAttributeFlags;
 
 /* All defined flags */
 #define SILC_ATTRIBUTE_FLAG_NONE          0x00    /* No flags */
@@ -189,6 +189,7 @@ typedef enum {
  *
  *    Parses one attribute payload sent as argument and saves it to
  *    SilcAttributePayload context.  The new allocated context is returned.
+ *
  ***/
 SilcAttributePayload
 silc_attribute_payload_parse(const unsigned char *payload,
@@ -354,14 +355,14 @@ typedef struct {
  *
  * DESCRIPTION
  *
- *    Data type for MIME object as attribute.  Caller must free the
- *    MIME data buffer inside the structure.
+ *    Data type for MIME object as attribute.  The data in the structure
+ *    is valid as long as the payload structure is valid.
  *
  * SOURCE
  */
 typedef struct {
-  unsigned char *mime;         /* allocated MIME buffer */
-  SilcUInt32 mime_len;         /* length of the allocated MIME buffer */
+  const unsigned char *mime;   /* MIME buffer */
+  SilcUInt32 mime_len;         /* length of the MIME buffer */
 } SilcAttributeObjMime;
 /***/
 
@@ -448,7 +449,7 @@ typedef struct {
  *    Returns TRUE if the `attribute' attribute was found and FALSE
  *    if such attribute is not present in the `payload', or the `object_size'
  *    is not sufficient.  See the definition of SilcAttribute for the
- *    list attributes and the required object types for attributes.
+ *    list of attributes and the required object types for attributes.
  *
  ***/
 bool silc_attribute_get_object(SilcAttributePayload payload,