33 #include "dcmtk/config/osconfig.h" 34 #include "dcmtk/ofstd/ofcond.h" 37 #define DUL_TYPENEGOTIATIONOFUSERIDENTITY (unsigned char)0x58 40 enum T_ASC_UserIdentityNegotiationMode
42 ASC_USER_IDENTITY_NONE = 0,
43 ASC_USER_IDENTITY_USER = 1,
44 ASC_USER_IDENTITY_USER_PASSWORD = 2,
45 ASC_USER_IDENTITY_KERBEROS = 3,
46 ASC_USER_IDENTITY_SAML = 4,
47 ASC_USER_IDENTITY_UNKNOWN
65 virtual unsigned char pduType()
const =0;
93 unsigned long& bytesRead,
94 unsigned long availData) =0;
102 unsigned long& lengthWritten)
const =0;
107 virtual void clear() =0;
113 virtual void dump(STD_NAMESPACE ostream& outstream)
const =0;
149 virtual void clear();
156 void setIdentityType(
const T_ASC_UserIdentityNegotiationMode& mode);
162 T_ASC_UserIdentityNegotiationMode getIdentityType();
169 void setPrimField(
const char *buffer,
170 const Uint16& length);
177 void setSecField(
const char *buffer,
178 const Uint16& length);
187 Uint16 getPrimField(
char*& resultBuf,
188 Uint16& resultLen)
const;
197 Uint16 getSecField(
char*& resultBuf,
198 Uint16& resultLen)
const;
204 void setReqPosResponse(
const OFBool& reqPosRsp);
212 return (m_posRspRequested != 0) ? OFTrue: OFFalse;
222 unsigned long& lengthWritten)
const;
239 unsigned long &bytesRead,
240 unsigned long availData);
246 void dump(STD_NAMESPACE ostream& outstream)
const;
297 virtual void clear();
304 void setServerResponse(
const char* rsp,
305 const Uint16& rspLen);
314 Uint16 getServerResponse(
char*& targetBuffer,
315 Uint16& resultLen)
const;
329 unsigned long& lengthWritten)
const;
340 unsigned long &bytesRead,
341 unsigned long availData);
347 void dump(STD_NAMESPACE ostream& outstream)
const;
virtual OFCondition parseFromBuffer(unsigned char *readBuffer, unsigned long &bytesRead, unsigned long availData)=0
Parse item from buffer.
virtual void dump(STD_NAMESPACE ostream &outstream) const =0
Dump content of this user identity sub item to output stream.
virtual void clear()=0
Clears member variables and frees memory.
T_ASC_UserIdentityNegotiationMode m_userIdentityType
User Identity Type: 1 (username), 2 (username/password), 3 (kerberos), 4 (SAML)
virtual unsigned char getItemType() const
Returns item type, which is constantly 0x58.
virtual unsigned char pduType() const =0
Denotes whether instance is part of a request (DUL_TYPEASSOCIATERQ) or acknowledge PDU (DUL_TYPEASSOC...
const unsigned char m_reserved
Reserved field, should be always sent with value 0 (default)
virtual ~UserIdentityNegotiationSubItem()
Destructor, nothing to clean up.
UserIdentityNegotiationSubItem()
Constructor.
unsigned char m_posRspRequested
If 1, positive response is requested from server. Set to 0 otherwise.
Uint16 m_secFieldLength
Length of primary value field in bytes.
virtual OFCondition stream(unsigned char *targetBuffer, unsigned long &lengthWritten) const =0
Stream the package into a byte stream for network transmission.
OFBool isPosResponseRequested()
Informs (the server) whether a positive response was requested.
Uint16 m_rspLength
Length of server response in bytes.
char * m_primField
Buffer for primary value field.
const unsigned char m_itemType
Item type of this user item.
virtual OFCondition streamedLength(unsigned long &length) const =0
Computes total length of item if streamed to a buffer.
char * m_serverRsp
Buffer for server response.
Abstract base class for User Identity Negotiation user items.
Class for User Identity Negotiation request user item.
char * m_secField
Buffer for secondary value field.
virtual unsigned char getReserved() const
Returns reserved field, which is 0 in this implementation (see DICOM standard)
Uint16 m_primFieldLength
Length of primary value field in bytes.
General purpose class for condition codes.