X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fbinding%2Fimpl%2FSAML2ArtifactType0004.cpp;h=95326770813567b697b89d41a34d1dd1343aee28;hb=d8a4f024b89272eae00618fc39e6127b6c191edd;hp=f1e405be9ec124f18ec862c7cd2a2af9b62dadef;hpb=932cfaae2176c2eba1a9938dc420591a9551a7f3;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/binding/impl/SAML2ArtifactType0004.cpp b/saml/saml2/binding/impl/SAML2ArtifactType0004.cpp index f1e405b..9532677 100644 --- a/saml/saml2/binding/impl/SAML2ArtifactType0004.cpp +++ b/saml/saml2/binding/impl/SAML2ArtifactType0004.cpp @@ -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. @@ -17,7 +17,7 @@ /** * SAML2ArtifactType0004.cpp * - * Type 0x0004 SAML 2.0 artifact class + * Type 0x0004 SAML 2.0 artifact class. */ #include "internal.h" @@ -83,3 +83,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 +}