Change license header, remove stale pkg files.
[shibboleth/cpp-opensaml.git] / saml / saml1 / binding / SAMLArtifactType0001.h
1 /**
2  * Licensed to the University Corporation for Advanced Internet
3  * Development, Inc. (UCAID) under one or more contributor license
4  * agreements. See the NOTICE file distributed with this work for
5  * additional information regarding copyright ownership.
6  *
7  * UCAID licenses this file to you under the Apache License,
8  * Version 2.0 (the "License"); you may not use this file except
9  * in compliance with the License. You may obtain a copy of the
10  * License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17  * either express or implied. See the License for the specific
18  * language governing permissions and limitations under the License.
19  */
20
21 /**
22  * @file saml/saml1/binding/SAMLArtifactType0001.h
23  * 
24  * Type 0x0001 SAML 1.x artifact class.
25  */
26
27 #ifndef __saml_artifacttype0001_h__
28 #define __saml_artifacttype0001_h__
29
30 #include <saml/binding/SAMLArtifact.h>
31
32 namespace opensaml {
33     namespace saml1p {
34         
35         /**
36          * Type 0x0001 SAML 1.x artifact class
37          */
38         class SAML_API SAMLArtifactType0001 : public SAMLArtifact
39         {
40             SAMLArtifactType0001& operator=(const SAMLArtifactType0001& src);
41         public:
42             /**
43              * Decodes a base64-encoded type 0x0001 artifact
44              * 
45              * @param s NULL-terminated base64-encoded string 
46              */        
47             SAMLArtifactType0001(const char* s);
48
49             /**
50              * Constructs an artifact with the specified source ID, but a random assertion handle.
51              * 
52              * @param sourceid SOURCEID_LENGTH bytes of binary data 
53              */        
54             SAMLArtifactType0001(const std::string& sourceid);
55
56             /**
57              * Constructs an artifact with the specified source ID and assertion handle.
58              * 
59              * @param sourceid  SOURCEID_LENGTH bytes of binary data
60              * @param handle    HANDLE_LENGTH bytes of binary data 
61              */        
62             SAMLArtifactType0001(const std::string& sourceid, const std::string& handle);
63     
64             virtual ~SAMLArtifactType0001();
65             
66             // Virtual function overrides.
67             SAMLArtifactType0001* clone() const;
68             std::string getSource() const;
69             std::string getMessageHandle() const;
70
71             /**
72              * Returns the binary data that identifies the source.
73              * The result MAY contain embedded null characters.
74              * 
75              * @return the binary source ID
76              */
77             virtual std::string getSourceID() const;
78             
79             /** Length of source ID */
80             static const unsigned int SOURCEID_LENGTH;
81
82             /** Length of assertion handle */
83             static const unsigned int HANDLE_LENGTH;
84     
85         protected:
86             /**
87              * Copy constructor.
88              * 
89              * @param src   object to copy
90              */
91             SAMLArtifactType0001(const SAMLArtifactType0001& src);
92         };
93         
94     };
95 };
96
97 #endif /* __saml_artifacttype0001_h__ */