GDCM  2.2.0
gdcmULConnectionInfo.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef GDCMULCONNECTIONINFO_H
00019 #define GDCMULCONNECTIONINFO_H
00020 
00021 #include "gdcmUserInformation.h"
00022 #include <string>
00023 
00024 namespace gdcm{
00025   namespace network {
00038 class ULConnectionInfo {
00039       UserInformation mUserInformation;
00040 
00041       char mCalledAETitle[16];
00042       char mCallingAETitle[16];
00043 
00044       unsigned long mCalledIPAddress;
00045       int mCalledIPPort;
00046       std::string mCalledComputerName; //either the IP or the name has to be filled in
00047   
00048       unsigned long mMaxPDULength;
00049     public:
00050       ULConnectionInfo();
00051 
00052       //it is possible to misinitialize this object, so
00053       //have it return false if something breaks (ie, given AEs are bigger than 16 characters,
00054       //no name or IP address).
00055       bool Initialize(UserInformation inUserInformation,
00056         const char inCalledAETitle[16], const char inCallingAETitle[16],
00057         unsigned long inCalledIPAddress, int inCalledIPPort,
00058         std::string inCalledComputerName);
00059 
00060       UserInformation GetUserInformation() const;
00061       const char* GetCalledAETitle() const;
00062       const char* GetCallingAETitle() const;
00063 
00064       unsigned long GetCalledIPAddress() const;
00065       int GetCalledIPPort() const;
00066       std::string GetCalledComputerName() const;
00067 
00068       //CStore needs to know the max pdu length, so the value gets initialized
00069       //when a cstore connection is established (but not for the others).
00070       void SetMaxPDULength(unsigned long inMaxPDULength);
00071       unsigned long GetMaxPDULength() const;
00072     };
00073   }
00074 }
00075 
00076 #endif //GDCMULCONNECTIONINFO_H

Generated on Fri Jun 1 2012 19:00:32 for GDCM by doxygen 1.7.6.1
SourceForge.net Logo