# savan_error.h

    00001 /*
    00002  * Copyright 2004,2005 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License")
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 #ifndef SAVAN_ERROR_H
    00018 #define SAVAN_ERROR_H
    00019
    00020 #include <axutil_error.h>
    00021
    00022 #ifdef __cplusplus
    00023 extern "C"
    00024 {
    00025 #endif
    00026
    00041     typedef enum savan_error_codes
    00042     {
    00043         /* No error */
    00044         SAVAN_ERROR_NONE = SAVAN_ERROR_CODES_START,
    00045
    00046         /* The soap action of an eventing message was missing */
    00047         SAVAN_ERROR_SOAP_ACTION_NULL,
    00048         /* Failed to create an instance of subscriber */
    00049         SAVAN_ERROR_FAILED_TO_CREATE_SUBSCRIBER,
    00050         /* Unhandled message type */
    00051         SAVAN_ERROR_UNHANDLED_MSG_TYPE,
    00052         /* Failed to build a default soap envelope */
    00053         SAVAN_ERROR_FAILED_TO_BUILD_SOAP_ENV,
    00054             /* Requested delivery mode is not supported */
    00055         SAVAN_ERROR_REQUESTED_DELIVERY_MODE_NOT_SUPPORTED,
    00056             /* Expiration time requested is invalid */
    00057         SAVAN_ERROR_EXPIRATION_TIME_REQUESTED_IS_INVALID,
    00058             /* Only expiration durations are supported */
    00059         SAVAN_ERROR_ONLY_EXPIRATION_DURATIONS_ARE_SUPPORTED,
    00060             /* Filtering is not supported */
    00061         SAVAN_ERROR_FILTERING_IS_NOT_SUPPORTED,
    00062             /* Requested filter dialect is not supported */
    00063         SAVAN_ERROR_REQUESTED_FILTER_DIALECT_IS_NOT_SUPPORTED,
    00064             /* Messsage is not valid and cannot be processed */
    00065         SAVAN_ERROR_MESSAGE_IS_NOT_VALID_AND_CANNOT_BE_PROCESSED,
    00066         /* Message cannot be processed by the event source */
    00067         SAVAN_ERROR_MESSAGE_CANNOT_BE_PROCESSED_BY_EVENT_SOURCE,
    00068         /* Unable to Renew */
    00069         SAVAN_ERROR_UNABLE_TO_RENEW,
    00070         /* Subscriber is not found */
    00071         SAVAN_ERROR_SUBSCRIBER_NOT_FOUND,
    00072         /* Could not populate Topic */
    00073         SAVAN_ERROR_COULD_NOT_POPULATE_TOPIC,
    00074         /* Parsing subsriber node failed */
    00075         SAVAN_ERROR_PARSING_SUBSCRIBER_NODE_FAILED,
    00076         /* Applying filter failed */
    00077         SAVAN_ERROR_APPLYING_FILTER_FAILED,
    00078         /* Memory allocation failed for Savan Storage Manager */
    00079         SAVAN_ERROR_STORAGE_MANAGER_CREATION_FAILED,
    00080         /* Could not retrieve subscriber from storage */
    00081         SAVAN_ERROR_SUBSCRIBER_RETRIEVE_ERROR,
    00082         /* Could not remove subscriber from storage */
    00083         SAVAN_ERROR_SUBSCRIBER_REMOVE_ERROR,
    00084         /* Could not update subscriber to storage */
    00085         SAVAN_ERROR_SUBSCRIBER_UPDATE_ERROR,
    00086         /* Could not insert subscriber into storage */
    00087         SAVAN_ERROR_SUBSCRIBER_INSERT_ERROR,
    00088         /* Could not insert topic into storage */
    00089         SAVAN_ERROR_TOPIC_INSERT_ERROR,
    00090         /* Could not create database table */
    00091         SAVAN_ERROR_DATABASE_TABLE_CREATION_ERROR,
    00092         /* Could not create database */
    00093         SAVAN_ERROR_DATABASE_CREATION_ERROR,
    00094         /* Could create the filter */
    00095         SAVAN_ERROR_FILTER_CREATION_FAILED,
    00096         /* Could not create the filter module */
    00097         SAVAN_ERROR_FILTER_MODULE_COULD_NOT_BE_RETRIEVED,
    00098
    00099         SAVAN_ERROR_LAST
    00100
    00101     } savan_error_codes_t;
    00102
    00103     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00104     savan_error_init();
    00105
    00106
    00107         #define SAVAN_FAULT_DMRU_CODE "s12:Sender"
    00108         #define SAVAN_FAULT_DMRU_SUB_CODE "wse:DeliveryModeRequestedUnavailable."
    00109         #define SAVAN_FAULT_DMRU_DETAIL ""
    00110
    00111         #define SAVAN_FAULT_IET_CODE "s12:Sender"
    00112         #define SAVAN_FAULT_IET_SUB_CODE "wse:InvalidExpirationTime"
    00113         #define SAVAN_FAULT_IET_DETAIL ""
    00114
    00115         #define SAVAN_FAULT_UET_CODE "s12:Sender"
    00116         #define SAVAN_FAULT_UET_SUB_CODE "wse:UnsupportedExpirationTime"
    00117         #define SAVAN_FAULT_UET_DETAIL ""
    00118
    00119         #define SAVAN_FAULT_FNS_CODE "s12:Sender"
    00120         #define SAVAN_FAULT_FNS_SUB_CODE "wse:FilteringNotSupported"
    00121         #define SAVAN_FAULT_FNS_DETAIL "Server doesn't support filtering"
    00122
    00123         #define SAVAN_FAULT_FRU_CODE "s12:Sender"
    00124         #define SAVAN_FAULT_FRU_SUB_CODE "wse:FilteringRequestedUnavailable"
    00125         #define SAVAN_FAULT_FRU_DETAIL "Server does not support the dialect"
    00126
    00127         #define SAVAN_FAULT_IM_CODE "s12:Sender"
    00128         #define SAVAN_FAULT_IM_SUB_CODE "wse:InvalidMessages"
    00129         #define SAVAN_FAULT_IM_DETAIL "Invalid message."
    00130
    00131         #define SAVAN_FAULT_ESUP_CODE "s12:Receiver"
    00132         #define SAVAN_FAULT_ESUP_SUB_CODE "wse:EventSourceUnableToProcess"
    00133         #define SAVAN_FAULT_ESUP_DETAIL ""
    00134
    00135         #define SAVAN_FAULT_UTR_CODE "s12:Receiver"
    00136         #define SAVAN_FAULT_UTR_SUB_CODE "wse:UnableToRenew"
    00137         #define SAVAN_FAULT_UTR_DETAIL1 "Could not find the subscriber"
    00138         #define SAVAN_FAULT_UTR_DETAIL2 "Subscription can not be renewed"
    00139
    00140         /*typedef enum savan_fault_types
    00141         {
    00142         SAVAN_FAULT_DMRU = 0,
    00143         SAVAN_FAULT_IET,
    00144         SAVAN_FAULT_UET,
    00145         SAVAN_FAULT_FNS,
    00146         SAVAN_FAULT_FRU,
    00147         SAVAN_FAULT_ESUP,
    00148         SAVAN_FAULT_UTR,
    00149         SAVAN_FAULT_IM
    00150         }savan_fault_types_t;*/
    00151
    00153 #ifdef __cplusplus
    00154 }
    00155 #endif
    00156
    00157 #endif /*SAVAN_ERROR_H*/