GDCM  2.2.0
gdcmULConnectionInfo.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef GDCMULCONNECTIONINFO_H
19 #define GDCMULCONNECTIONINFO_H
20 
21 #include "gdcmUserInformation.h"
22 #include <string>
23 
24 namespace gdcm{
25  namespace network {
39  UserInformation mUserInformation;
40 
41  char mCalledAETitle[16];
42  char mCallingAETitle[16];
43 
44  unsigned long mCalledIPAddress;
45  int mCalledIPPort;
46  std::string mCalledComputerName; //either the IP or the name has to be filled in
47 
48  unsigned long mMaxPDULength;
49  public:
51 
52  //it is possible to misinitialize this object, so
53  //have it return false if something breaks (ie, given AEs are bigger than 16 characters,
54  //no name or IP address).
55  bool Initialize(UserInformation inUserInformation,
56  const char inCalledAETitle[16], const char inCallingAETitle[16],
57  unsigned long inCalledIPAddress, int inCalledIPPort,
58  std::string inCalledComputerName);
59 
61  const char* GetCalledAETitle() const;
62  const char* GetCallingAETitle() const;
63 
64  unsigned long GetCalledIPAddress() const;
65  int GetCalledIPPort() const;
66  std::string GetCalledComputerName() const;
67 
68  //CStore needs to know the max pdu length, so the value gets initialized
69  //when a cstore connection is established (but not for the others).
70  void SetMaxPDULength(unsigned long inMaxPDULength);
71  unsigned long GetMaxPDULength() const;
72  };
73  }
74 }
75 
76 #endif //GDCMULCONNECTIONINFO_H

Generated on Wed Jun 13 2012 20:40:37 for GDCM by doxygen 1.8.1
SourceForge.net Logo