X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccore%2Fsilcstatus.h;h=3b5c7cd0ec648fd97cee67c6fbfd0cfada70ec17;hb=413da0f8686910f5e627393157566ae729ca99c4;hp=a11e693bce5a5199e55150edd551e5979e38c905;hpb=fca3453b57d29a0d28a1ef2ba9d7f5b3a2801c28;p=silc.git diff --git a/lib/silccore/silcstatus.h b/lib/silccore/silcstatus.h index a11e693b..3b5c7cd0 100644 --- a/lib/silccore/silcstatus.h +++ b/lib/silccore/silcstatus.h @@ -1,10 +1,10 @@ /* - silcstatus.h + silcstatus.h Author: Pekka Riikonen - 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 @@ -36,7 +36,7 @@ /****d* silccore/StatusTypes/SilcStatus * * NAME - * + * * typedef SilcUInt8 SilcStatus * * DESCRIPTION @@ -58,7 +58,7 @@ typedef SilcUInt8 SilcStatus; #define SILC_STATUS_ERR_NO_SUCH_NICK 10 #define SILC_STATUS_ERR_NO_SUCH_CHANNEL 11 #define SILC_STATUS_ERR_NO_SUCH_SERVER 12 -#define SILC_STATUS_ERR_TOO_MANY_TARGETS 13 +#define SILC_STATUS_ERR_INCOMPLETE_INFORMATION 13 #define SILC_STATUS_ERR_NO_RECIPIENT 14 #define SILC_STATUS_ERR_UNKNOWN_COMMAND 15 #define SILC_STATUS_ERR_WILDCARDS 16 @@ -93,7 +93,37 @@ typedef SilcUInt8 SilcStatus; #define SILC_STATUS_ERR_AUTH_FAILED 45 #define SILC_STATUS_ERR_UNKNOWN_ALGORITHM 46 #define SILC_STATUS_ERR_NO_SUCH_SERVER_ID 47 +#define SILC_STATUS_ERR_RESOURCE_LIMIT 48 #define SILC_STATUS_ERR_NO_SUCH_SERVICE 49 +#define SILC_STATUS_ERR_NOT_AUTHENTICATED 50 +#define SILC_STATUS_ERR_BAD_SERVER_ID 51 +#define SILC_STATUS_ERR_KEY_EXCHANGE_FAILED 52 +#define SILC_STATUS_ERR_BAD_VERSION 53 +#define SILC_STATUS_ERR_TIMEDOUT 54 +#define SILC_STATUS_ERR_UNSUPPORTED_PUBLIC_KEY 55 +#define SILC_STATUS_ERR_OPERATION_ALLOWED 56 /***/ +#define SILC_STATUS_IS_ERROR(status) (status >= SILC_STATUS_ERR_NO_SUCH_NICK) + +/****f* silccore/SilcStatusTypes/silc_status_get_args + * + * SYNOPSIS + * + * SilcUInt32 silc_status_get_args(SilcStatus status, + * SilcArgumentPayload args, + * void **ret_arg1, **ret_arg2); + * + * DESCRIPTION + * + * Parses and returns the arguments from the `args' by the status type + * indicated by `status'. Returns the number of arguments (0, 1 or 2) + * parsed. The caller must free with silc_free the returned arguments. + * + ***/ +SilcUInt32 silc_status_get_args(SilcStatus status, + SilcArgumentPayload args, + void **ret_arg1, void **ret_arg2); + + #endif /* SILCSTATUS_H */