proton/sasl.h

Go to the documentation of this file.
00001 #ifndef PROTON_SASL_H
00002 #define PROTON_SASL_H 1
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include <proton/import_export.h>
00026 #include <proton/type_compat.h>
00027 #include <proton/types.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00049 typedef struct pn_sasl_t pn_sasl_t;
00050 
00054 typedef enum {
00055   PN_SASL_NONE = -1,  
00056   PN_SASL_OK = 0,     
00057   PN_SASL_AUTH = 1,   
00058   PN_SASL_SYS = 2,    
00059   PN_SASL_PERM = 3,   
00060   PN_SASL_TEMP = 4    
00061 } pn_sasl_outcome_t;
00062 
00074 PN_EXTERN pn_sasl_t *pn_sasl(pn_transport_t *transport);
00075 
00088 PN_EXTERN bool pn_sasl_extended(void);
00089 
00097 PN_EXTERN void pn_sasl_done(pn_sasl_t *sasl, pn_sasl_outcome_t outcome);
00098 
00104 PN_EXTERN pn_sasl_outcome_t pn_sasl_outcome(pn_sasl_t *sasl);
00105 
00123 PN_EXTERN const char *pn_sasl_get_user(pn_sasl_t *sasl);
00124 
00134 PN_EXTERN const char *pn_sasl_get_mech(pn_sasl_t *sasl);
00135 
00145 PN_EXTERN void pn_sasl_allowed_mechs(pn_sasl_t *sasl, const char *mechs);
00146 
00164 PN_EXTERN void pn_sasl_set_allow_insecure_mechs(pn_sasl_t *sasl, bool insecure);
00165 
00171 PN_EXTERN bool pn_sasl_get_allow_insecure_mechs(pn_sasl_t *sasl);
00172 
00185 PN_EXTERN void pn_sasl_config_name(pn_sasl_t *sasl, const char *name);
00186 
00202 PN_EXTERN void pn_sasl_config_path(pn_sasl_t *sasl, const char *path);
00203 
00208 #ifdef __cplusplus
00209 }
00210 #endif
00211 
00212 #endif /* sasl.h */

Generated on 29 Mar 2018 for Qpid Proton C by  doxygen 1.6.1