in progress use DDF to serialise names
[moonshot.git] / mech_eap / util_attr.h
index 6af4cf3..347842a 100644 (file)
 #include <string>
 #include <new>
 
+#include <shibsp/remoting/ddf.h>
+
+using namespace shibsp;
+
 struct gss_eap_attr_provider;
 struct gss_eap_attr_ctx;
 
@@ -121,6 +125,7 @@ public:
     {
         return NULL;
     }
+
     virtual void releaseAnyNameMapping(gss_buffer_t type_id GSSEAP_UNUSED,
                                        gss_any_t input GSSEAP_UNUSED) const
     {
@@ -131,16 +136,22 @@ public:
         return NULL;
     }
 
-    virtual void exportToBuffer(gss_buffer_t buffer GSSEAP_UNUSED) const
+    virtual const char *marshallingKey(void) const
     {
+        return NULL;
     }
 
-    virtual bool initFromBuffer(const gss_eap_attr_ctx *manager,
-                                const gss_buffer_t buffer GSSEAP_UNUSED)
+    virtual bool unmarshallAndInit(const gss_eap_attr_ctx *manager,
+                                   DDF &object GSSEAP_UNUSED)
     {
         return initWithManager(manager);
     }
 
+    virtual DDF marshall(void) const
+    {
+        return DDF(NULL);
+    }
+
     virtual time_t getExpiryTime(void) const { return 0; }
 
     virtual OM_uint32 mapException(OM_uint32 *minor GSSEAP_UNUSED,
@@ -242,6 +253,9 @@ private:
     unsigned int attributePrefixToType(const gss_buffer_t prefix) const;
     gss_buffer_desc attributeTypeToPrefix(unsigned int type) const;
 
+    bool unmarshallAndInit(DDF &object);
+    DDF marshall(void) const;
+
     gss_eap_attr_provider *getPrimaryProvider(void) const;
 
     /* make non-copyable */