/* * sync-agent * Copyright (c) 2012 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef PROTOCOL_BINDER_ERROR_H_ #define PROTOCOL_BINDER_ERROR_H_ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @file error.h * @brief Defines protocol-binder errors */ /** @addtogroup protocol_binder * @{ */ /** * @brief Enumerations of error code for protocol binder */ typedef enum { SYNC_AGENT_PB_RETURN_OK = 0, /**< Successful */ SYNC_AGENT_PB_RETURN_HAS_NO_MORE_ELEMENT = 1, /**< No more XML Element */ SYNC_AGENT_PB_RETURN_UNKNOWN_ERROR, /**< Unknown Error */ SYNC_AGENT_PB_RETURN_OUT_OF_MEMORY, /**< Out of memory */ SYNC_AGENT_PB_RETURN_NOT_DEFINED, /**< Something that have to be defined is not defined */ SYNC_AGENT_PB_RETURN_INIT_REQUIRED_OR_INVALID_BINDER, /**< Initialization is required or invalid binder */ SYNC_AGENT_PB_RETURN_UNKNOWN_ENCODING, /**< Unknown Encoding type */ SYNC_AGENT_PB_RETURN_NOT_SUPPORT_FOR_XML_ENCODING, /**< Not Support for XML encoding */ SYNC_AGENT_PB_RETURN_NOT_SUPPORT_FOR_XML_DECODING, /**< Not Support for XML decoding */ SYNC_AGENT_PB_RETURN_UNKNOWN_LANGUAGE, /**< Unknown Language */ SYNC_AGENT_PB_RETURN_WBXML_PARSE_FAIL, /**< WBXML Parse Fail */ SYNC_AGENT_PB_RETURN_XML_PARSE_FAIL, /**< XML Parse Fail */ SYNC_AGENT_PB_RETURN_INVALID_XML, /**< Invalid XML */ SYNC_AGENT_PB_RETURN_BINDER_FUNCTION_SET_NOT_DEFINED, /**< Function Set Not Defined */ SYNC_AGENT_PB_RETURN_BINDER_FUNCTION_SET_LOOKUP_TBL_NOT_DEFINED, /**< Lookup table has not defined */ SYNC_AGENT_PB_RETURN_INVALID_PROTOCOL, /**< Invalid Protocol */ SYNC_AGENT_PB_RETURN_INVALID_CONTENT, /**< Invalid Content */ SYNC_AGENT_PB_RETURN_UNEXPECTED_CASE_ACCORDING_TO_PROTOCOL_SPEC, /**< Unexpected case according to protocol spec */ SYNC_AGENT_PB_RETURN_ALREADY_SWITCH_PROTOCOL, /**< Operation failed */ SYNC_AGENT_PB_RETURN_HAS_NO_UNDO_SWITCH_PROTOCOL, /**< Operation failed */ SYNC_AGENT_PB_RETURN_INVALID_PROTOCOL_ELEMENT, /**< Invalid protocol element */ SYNC_AGENT_PB_RETURN_APPEND_INVALID_PROTOCOL_ELEMENT, /**< Invalid protocol element */ SYNC_AGENT_PB_RETURN_INVALID_INPUT_PARAMETER, /**< Invalid input parameter */ SYNC_AGENT_PB_RETURN_TREE_NODE_IS_NOT_ELEMENT_NODE, /**< Invalid parameter */ SYNC_AGENT_PB_RETURN_TREE_ALREADY_HAS_ROOT, /**< Already has root in WBXMLTree */ /* protocol binder error */ SYNC_AGENT_PB_RETURN_UTIL_NO_TEXT_VALUE, /**< Invalid parameter *//* TODO remove */ SYNC_AGENT_PB_RETURN_UTIL_NO_BINARY_VALUE, /**< Invalid parameter */ SYNC_AGENT_PB_RETURN_UTIL_NO_INT_VALUE /**< Invalid parameter */ } sync_agent_pb_error_e; /** * @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PROTOCOL_BINDER_ERROR_H_ */