Change license header, remove stale pkg files.
[shibboleth/cpp-opensaml.git] / saml / saml2 / binding / impl / SAML2ArtifactType0004.cpp
index f1e405b..9fb9cf7 100644 (file)
@@ -1,23 +1,27 @@
-/*
- *  Copyright 2001-2007 Internet2
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the University Corporation for Advanced Internet
+ * Development, Inc. (UCAID) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
+ *
+ * UCAID licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the
+ * License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
  */
 
 /**
  * SAML2ArtifactType0004.cpp
  * 
- * Type 0x0004 SAML 2.0 artifact class 
+ * Type 0x0004 SAML 2.0 artifact class.
  */
 
 #include "internal.h"
@@ -83,3 +87,31 @@ SAML2ArtifactType0004::SAML2ArtifactType0004(const string& sourceid, int index,
     m_raw.append(sourceid,0,SOURCEID_LENGTH);
     m_raw.append(handle,0,HANDLE_LENGTH);
 }
+
+SAML2ArtifactType0004::SAML2ArtifactType0004(const SAML2ArtifactType0004& src) : SAML2Artifact(src)
+{
+}
+
+SAML2ArtifactType0004::~SAML2ArtifactType0004()
+{
+}
+
+SAML2ArtifactType0004* SAML2ArtifactType0004::clone() const
+{
+    return new SAML2ArtifactType0004(*this);
+}
+
+string SAML2ArtifactType0004::getSource() const
+{
+    return toHex(getSourceID());
+}
+
+string SAML2ArtifactType0004::getSourceID() const
+{
+    return m_raw.substr(TYPECODE_LENGTH + INDEX_LENGTH, SOURCEID_LENGTH);    // bytes 5-24
+}
+
+string SAML2ArtifactType0004::getMessageHandle() const
+{
+    return m_raw.substr(TYPECODE_LENGTH + INDEX_LENGTH + SOURCEID_LENGTH, HANDLE_LENGTH);    // bytes 25-44
+}