Convert from NULL macro to nullptr, remove unused zlib code.
[shibboleth/cpp-opensaml.git] / saml / signature / SignableObject.h
index 9f0e992..bd57ade 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2007 Internet2
+ *  Copyright 2001-2009 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #define __saml_signable_h__
 
 #include <saml/base.h>
-#include <saml/signature/ContentReference.h>
 #include <xmltooling/XMLObject.h>
 
+namespace xmlsignature {
+    class XMLTOOL_API Signature;
+};
+
 namespace opensaml {
 
     /**
@@ -35,28 +38,24 @@ namespace opensaml {
     class SAML_API SignableObject : public virtual xmltooling::XMLObject
     {
     public:
-        virtual ~SignableObject() {}
-
-        /**
-         * Gets a new ContentReference object bound to this object.
-         * It's lifetime must not outlast this object, so it should
-         * generally be set into a Signature owned by the object.
-         * 
-         * @return  a new ContentReference
-         */
-        virtual ContentReference* getContentReference() const {
-            return new ContentReference(*this);
-        }
+        virtual ~SignableObject();
         
         /**
          * Returns the enveloped Signature from the object.
          *
-         * @return the enveloped Signature, or NULL
+         * @return the enveloped Signature, or nullptr
          */
         virtual xmlsignature::Signature* getSignature() const=0;
 
+        /**
+         * Sets an enveloped Signature in the object.
+         *
+         * @param sig the enveloped Signature, or nullptr
+         */
+        virtual void setSignature(xmlsignature::Signature* sig)=0;
+
     protected:
-        SignableObject() {}
+        SignableObject();
     };
 
 };