#include <string>
#include <new>
-#include <jansson.h>
+using namespace gss_eap_util;
struct gss_eap_attr_provider;
struct gss_eap_attr_ctx;
return true;
}
- virtual bool initFromExistingContext(const gss_eap_attr_ctx *manager,
+ virtual bool initWithExistingContext(const gss_eap_attr_ctx *manager,
const gss_eap_attr_provider *ctx GSSEAP_UNUSED)
{
return initWithManager(manager);
}
- virtual bool initFromGssContext(const gss_eap_attr_ctx *manager,
+ virtual bool initWithGssContext(const gss_eap_attr_ctx *manager,
const gss_cred_id_t cred GSSEAP_UNUSED,
const gss_ctx_id_t ctx GSSEAP_UNUSED)
{
}
virtual bool initWithJsonObject(const gss_eap_attr_ctx *manager,
- json_t *object GSSEAP_UNUSED)
+ JSONObject &object GSSEAP_UNUSED)
{
return initWithManager(manager);
}
- virtual json_t *jsonRepresentation(void) const
+ virtual JSONObject jsonRepresentation(void) const
{
- return NULL;
+ return JSONObject::null();
}
virtual time_t getExpiryTime(void) const { return 0; }
gss_eap_attr_ctx(void);
~gss_eap_attr_ctx(void);
- bool initFromExistingContext(const gss_eap_attr_ctx *manager);
- bool initFromGssContext(const gss_cred_id_t cred,
+ bool initWithExistingContext(const gss_eap_attr_ctx *manager);
+ bool initWithGssContext(const gss_cred_id_t cred,
const gss_ctx_id_t ctx);
bool getAttributeTypes(gss_eap_attr_enumeration_cb, void *data) const;
gss_any_t input) const;
void exportToBuffer(gss_buffer_t buffer) const;
- bool initFromBuffer(const gss_buffer_t buffer);
+ bool initWithBuffer(const gss_buffer_t buffer);
static std::string
composeAttributeName(const gss_buffer_t prefix,
unsigned int attributePrefixToType(const gss_buffer_t prefix) const;
gss_buffer_desc attributeTypeToPrefix(unsigned int type) const;
- bool initWithJsonObject(json_t *object);
- json_t *jsonRepresentation(void) const;
+ bool initWithJsonObject(JSONObject &object);
+ JSONObject jsonRepresentation(void) const;
gss_eap_attr_provider *getPrimaryProvider(void) const;
OM_uint32 minor;
if (GSS_ERROR(duplicateBuffer(&minor, &src, dst)))
- throw new std::bad_alloc();
+ throw std::bad_alloc();
}
static inline void