lm_connection.c
changeset 4 5770be2d5f3f
parent 1 64a857d6b81b
child 6 90073cbb535d
equal deleted inserted replaced
3:4fd19a188509 4:5770be2d5f3f
    14 /// You should create a new connection object, then open it (establish
    14 /// You should create a new connection object, then open it (establish
    15 /// connection), then authenticate to the server.
    15 /// connection), then authenticate to the server.
    16 
    16 
    17 /// connection state
    17 /// connection state
    18 /// Stirng, representing current connection state.
    18 /// Stirng, representing current connection state.
    19 /// V: closed, opening, open, authenticating, authenticated
    19 /// G:
    20 const string2enum_t llm_connection_state[] = {
    20 const string2enum_t llm_connection_state[] = {
    21 	{ "closed",         LM_CONNECTION_STATE_CLOSED         },
    21 	{ "closed",         LM_CONNECTION_STATE_CLOSED         },
    22 	{ "opening",        LM_CONNECTION_STATE_OPENING        },
    22 	{ "opening",        LM_CONNECTION_STATE_OPENING        },
    23 	{ "open",           LM_CONNECTION_STATE_OPEN           },
    23 	{ "open",           LM_CONNECTION_STATE_OPEN           },
    24 	{ "authenticating", LM_CONNECTION_STATE_AUTHENTICATING },
    24 	{ "authenticating", LM_CONNECTION_STATE_AUTHENTICATING },
    27 };
    27 };
    28 
    28 
    29 /// handler priority
    29 /// handler priority
    30 /// String, according to which handler will be placed into one
    30 /// String, according to which handler will be placed into one
    31 /// of three handler groups.
    31 /// of three handler groups.
    32 /// V: last, normal, first
    32 /// G:
    33 const string2enum_t llm_handler_priority[] = {
    33 const string2enum_t llm_handler_priority[] = {
    34 	{ "last",   LM_HANDLER_PRIORITY_LAST   },
    34 	{ "last",   LM_HANDLER_PRIORITY_LAST   },
    35 	{ "normal", LM_HANDLER_PRIORITY_NORMAL },
    35 	{ "normal", LM_HANDLER_PRIORITY_NORMAL },
    36 	{ "first",  LM_HANDLER_PRIORITY_FIRST  },
    36 	{ "first",  LM_HANDLER_PRIORITY_FIRST  },
    37 	{ NULL,     0                          }, // XXX
    37 	{ NULL,     0                          }, // XXX
    38 };
    38 };
    39 
    39 
    40 /// disconnect reason
    40 /// disconnect reason
    41 /// String, indicating the reason of disconnection occured.
    41 /// String, indicating the reason of disconnection occured.
    42 /// V: ok, ping time out, hup, error, resource conflict, invalid xml, unknown, ping_time_out, resource_conflict, invalid_xml
    42 /// G:
    43 const string2enum_t llm_disconnect_reason[] = {
    43 static const string2enum_t llm_disconnect_reason[] = {
    44 	{ "ok",                LM_DISCONNECT_REASON_OK                },
    44 	{ "ok",                LM_DISCONNECT_REASON_OK                },
    45 	{ "ping time out",     LM_DISCONNECT_REASON_PING_TIME_OUT     },
    45 	{ "ping time out",     LM_DISCONNECT_REASON_PING_TIME_OUT     },
    46 	{ "hup",               LM_DISCONNECT_REASON_HUP               },
    46 	{ "hup",               LM_DISCONNECT_REASON_HUP               },
    47 	{ "error",             LM_DISCONNECT_REASON_ERROR             },
    47 	{ "error",             LM_DISCONNECT_REASON_ERROR             },
    48 	{ "resource conflict", LM_DISCONNECT_REASON_RESOURCE_CONFLICT },
    48 	{ "resource conflict", LM_DISCONNECT_REASON_RESOURCE_CONFLICT },