Function amqp_constant_name

Synopsis

#include <librabbitmq/amqp_framing.h>

char const  * amqp_constant_name(int constantNumber)

Description

Get constant name string from constant

Parameters:

[ in ] constantNumber - constant to get the name of

Return
string describing the constant. String is managed by the library and should not be free()'d by the program

Source

Lines 47-102 in librabbitmq/amqp_framing.c. Line 87 in librabbitmq/amqp_framing.h.

char const *amqp_constant_name(int constantNumber) {
  switch (constantNumber) {
    case AMQP_FRAME_METHOD:
      return "AMQP_FRAME_METHOD";
    case AMQP_FRAME_HEADER:
      return "AMQP_FRAME_HEADER";
    case AMQP_FRAME_BODY:
      return "AMQP_FRAME_BODY";
    case AMQP_FRAME_HEARTBEAT:
      return "AMQP_FRAME_HEARTBEAT";
    case AMQP_FRAME_MIN_SIZE:
      return "AMQP_FRAME_MIN_SIZE";
    case AMQP_FRAME_END:
      return "AMQP_FRAME_END";
    case AMQP_REPLY_SUCCESS:
      return "AMQP_REPLY_SUCCESS";
    case AMQP_CONTENT_TOO_LARGE:
      return "AMQP_CONTENT_TOO_LARGE";
    case AMQP_NO_ROUTE:
      return "AMQP_NO_ROUTE";
    case AMQP_NO_CONSUMERS:
      return "AMQP_NO_CONSUMERS";
    case AMQP_ACCESS_REFUSED:
      return "AMQP_ACCESS_REFUSED";
    case AMQP_NOT_FOUND:
      return "AMQP_NOT_FOUND";
    case AMQP_RESOURCE_LOCKED:
      return "AMQP_RESOURCE_LOCKED";
    case AMQP_PRECONDITION_FAILED:
      return "AMQP_PRECONDITION_FAILED";
    case AMQP_CONNECTION_FORCED:
      return "AMQP_CONNECTION_FORCED";
    case AMQP_INVALID_PATH:
      return "AMQP_INVALID_PATH";
    case AMQP_FRAME_ERROR:
      return "AMQP_FRAME_ERROR";
    case AMQP_SYNTAX_ERROR:
      return "AMQP_SYNTAX_ERROR";
    case AMQP_COMMAND_INVALID:
      return "AMQP_COMMAND_INVALID";
    case AMQP_CHANNEL_ERROR:
      return "AMQP_CHANNEL_ERROR";
    case AMQP_UNEXPECTED_FRAME:
      return "AMQP_UNEXPECTED_FRAME";
    case AMQP_RESOURCE_ERROR:
      return "AMQP_RESOURCE_ERROR";
    case AMQP_NOT_ALLOWED:
      return "AMQP_NOT_ALLOWED";
    case AMQP_NOT_IMPLEMENTED:
      return "AMQP_NOT_IMPLEMENTED";
    case AMQP_INTERNAL_ERROR:
      return "AMQP_INTERNAL_ERROR";
    default:
      return "(unknown)";
  }
}





Add Discussion as Guest

Log in to DocsForge