1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
/*
Aeskulap ImagePool - DICOM abstraction library
Copyright (C) 2005 Alexander Pipelka
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Alexander Pipelka
*/
#ifndef IMAGEPOOL_NETWORK_H
#define IMAGEPOOL_NETWORK_H
#include "poolassociation.h"
class Network {
public:
/**
constructors
*/
Network();
virtual ~Network();
/**
Initialize the dicom network
*/
OFCondition InitializeNetwork(int timeout=20, int port = 0);
/**
Drop the dicom network
*/
OFCondition DropNetwork();
/**
Connect an association to the specified host
*/
OFCondition ConnectAssociation(Association* assoc, int lossy = 0);
/**
Send C-Echo request to dicom node
*/
bool SendEchoRequest(const std::string& title, const std::string& peer, int port, const std::string& ouraet);
/**
Get the pointer to the internal dcmtk network variable (sorry)
*/
T_ASC_Network* GetDcmtkNet();
void SetDcmtkNet(T_ASC_Network* n);
/**
static const char* GetCurrDate();
*/
/**
static const char* GetCurrTime();
*/
private:
/**
Add all possible presentation contexts to association parameters
*/
static OFCondition addAllStoragePresentationContexts(T_ASC_Parameters *params, bool bProposeCompression = true, int lossy = 0);
/**
Connect to a host and try to establish an association
*/
OFCondition ASC_ConnectAssociation(Association* assoc, const std::string& peerTitle, const std::string& peer, int port, const std::string& ouraet, const char *abstractSyntax = NULL, int lossy = 0);
/**
THE dicom network
*/
static T_ASC_Network* net;
friend class Association;
};
#endif // IMAGEPOOL_NETWORK_H
|