// SrmRequstFileStatus.h #ifndef dial__SrmRequstFileStatus_H #define dial__SrmRequstFileStatus_H // Wrapper for SRM request status. #include "dial_ws_srm/SrmFileMetadata.h" #include namespace dial { class SrmRequestFileStatus : public SrmFileMetadata { public: // typedefs typedef std::string State; typedef int Id; typedef std::string Name; typedef int Order; typedef time_t Time; typedef ns4__RequestFileStatus GsoapRequestFileStatus; private: // data State m_state; Id m_fid; Name m_turl; Name m_src; Name m_dest; Order m_qord; Time m_tup; Time m_tready; public: // data // Default constructor (invalid). SrmRequestFileStatus(); // Constructor from gsoap SRM file request status. explicit SrmRequestFileStatus(const GsoapRequestFileStatus& grs); // Is this a valid request file status? // True for any recognized state. bool is_valid() const; // State. // SRM 1.0: {Pending, Ready, Running, Done, Failed}. State state() const; bool is_pending() const; bool is_ready() const; bool is_running() const; bool is_done() const; bool is_failed() const; // File ID. Id file_id() const; // Transfer URL. // Blank until the file is ready for transfer. Name turl() const; // Time at which this status was updated. Time update_time() const; // Estimated time at which the file will be ready for transfer. // Zero if no estimate is available or the file is not pending. Time ready_time() const; // Source file name (may not me meaningful to SRM). Name source_file() const; // Destination file anem (may not be meaningful to SRM). Name destination_file() const; // Position in queue. Order queue_order() const; }; } // end unnamed namespace // Output stream std::ostream& operator<<(std::ostream& lhs, const dial::SrmRequestFileStatus& rhs); #endif