mask |= SILC_ATTRIBUTE_CONTACT_MMS;
if (!strcasecmp(*entry, "CHAT"))
mask |= SILC_ATTRIBUTE_CONTACT_CHAT;
+ if (!strcasecmp(*entry, "VIDEO"))
+ mask |= SILC_ATTRIBUTE_CONTACT_VIDEO;
}
silc_client_attribute_add(silc_client, conn,
SILC_ATTRIBUTE_PREFERRED_CONTACT, (void *)mask,
silc_strncat(tmp, sizeof(tmp), "SMS ", strlen(" SMS"));
if (mask & SILC_ATTRIBUTE_CONTACT_MMS)
silc_strncat(tmp, sizeof(tmp), "MMS ", strlen(" MMS"));
+ if (mask & SILC_ATTRIBUTE_CONTACT_VIDEO)
+ silc_strncat(tmp, sizeof(tmp), "VIDEO ", strlen(" VIDEO"));
printformat_module("fe-common/silc", server, NULL,
MSGLEVEL_CRAP, SILCTXT_ATTR_PREFERRED_CONTACT, tmp);
}
/*
- silcattrs.h
+ silcattrs.h
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2002 Pekka Riikonen
+ Copyright (C) 2002 - 2003 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
/****s* silccore/SilcAttributesAPI/SilcAttributePayload
*
* NAME
- *
+ *
* typedef struct SilcAttributePayloadStruct *SilcAttributePayload;
*
* DESCRIPTION
/****d* silccore/SilcAttributesAPI/SilcAttribute
*
* NAME
- *
+ *
* typedef SilcUInt8 SilcAttribute;
*
* DESCRIPTION
/****d* silccore/SilcAttributesAPI/SilcAttributeFlags
*
* NAME
- *
+ *
* typedef SilcUInt8 SilcAttributeFlags;
*
* DESCRIPTION
/****d* silccore/SilcAttributesAPI/SilcAttributeMood
*
* NAME
- *
+ *
* typedef enum { ... } SilcAttributeMood;
*
* DESCRIPTION
/****d* silccore/SilcAttributesAPI/SilcAttributeContact
*
* NAME
- *
+ *
* typedef enum { ... } SilcAttributeContact;
*
* DESCRIPTION
SILC_ATTRIBUTE_CONTACT_SMS = 0x00000008, /* SMS preferred */
SILC_ATTRIBUTE_CONTACT_MMS = 0x00000010, /* MMS preferred */
SILC_ATTRIBUTE_CONTACT_CHAT = 0x00000020, /* chatting preferred */
+ SILC_ATTRIBUTE_CONTACT_VIDEO = 0x00000040, /* video conferencing */
} SilcAttributeContact;
/***/
/****d* silccore/SilcAttributesAPI/SilcAttributeDevice
*
* NAME
- *
+ *
* typedef enum { ... } SilcAttributeDevice;
*
* DESCRIPTION
/****s* silccore/SilcAttributesAPI/SilcAttributeObjService
*
* NAME
- *
+ *
* typedef struct { ... } SilcAttributeObjService;
*
* DESCRIPTION
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcAttributeObjServiceStruct {
SilcUInt32 port; /* IANA specified service port */
SilcUInt32 idle; /* Idle time in the service */
char signon[64]; /* Signon date and time (UTC) */
/****s* silccore/SilcAttributesAPI/SilcAttributeObjMime
*
* NAME
- *
+ *
* typedef struct { ... } SilcAttributeObjMime;
*
* DESCRIPTION
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcAttributeObjMimeStruct {
const unsigned char *mime; /* MIME buffer */
SilcUInt32 mime_len; /* length of the MIME buffer */
} SilcAttributeObjMime;
/****s* silccore/SilcAttributesAPI/SilcAttributeObjGeo
*
* NAME
- *
+ *
* typedef struct { ... } SilcAttributeObjGeo;
*
* DESCRIPTION
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcAttributeObjGeoStruct {
char *longitude; /* Longitude */
char *latitude; /* Latitude */
char *altitude; /* Altitude */
/****s* silccore/SilcAttributesAPI/SilcAttributeObjDevice
*
* NAME
- *
+ *
* typedef struct { ... } SilcAttributeObjDevice;
*
* DESCRIPTION
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcAttributeObjDeviceStruct {
SilcAttributeDevice type; /* device type */
char *manufacturer; /* manufacturer of the device */
char *version; /* device version string */
/****s* silccore/SilcAttributesAPI/SilcAttributeObjPk
*
* NAME
- *
+ *
* typedef struct { ... } SilcAttributeObjPk;
*
* DESCRIPTION
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcAttributeObjPkStruct {
char *type; /* public key/certificate type, NULL
when contains digital signature. */
unsigned char *data; /* public key/cert/signature data. The
* You can use silc_attribute_get_attribute to get the SilcAttribute
* type from the `payload'.
*
+ * EXAMPLE
+ *
+ * SilcAttributeObjDevice dev;
+ *
+ * ...
+ * case SILC_ATTRIBUTE_DEVICE_INFO:
+ * memset(&dev, 0, sizeof(dev));
+ * if (!silc_attribute_get_object(payload, (void *)&dev, sizeof(dev)))
+ * error();
+ * ...
+ *
***/
bool silc_attribute_get_object(SilcAttributePayload payload,
void *object, SilcUInt32 object_size);