00001 /* 00002 * 00003 * File: FileRequest.h 00004 * 00005 * Copyright Jonathan Schaeffer 2009-2010, 00006 * CC-IN2P3, CNRS <jonathan.schaeffer@cc.in2p3.fr> 00007 * Contributors : Andres Gomez, 00008 * CC-IN2P3, CNRS <andres.gomez@cc.in2p3.fr> 00009 * 00010 * This software is a computer program whose purpose is to schedule, sort 00011 * and submit file requests to the hierarchical storage system HPSS. 00012 * 00013 * This software is governed by the CeCILL license under French law and 00014 * abiding by the rules of distribution of free software. You can use, 00015 * modify and/or redistribute the software under the terms of the CeCILL 00016 * license as circulated by CEA, CNRS and INRIA at the following URL 00017 * "http://www.cecill.info". 00018 * 00019 * As a counterpart to the access to the source code and rights to copy, 00020 * modify and redistribute granted by the license, users are provided only 00021 * with a limited warranty and the software's author, the holder of the 00022 * economic rights, and the successive licensors have only limited 00023 * liability. 00024 * 00025 * In this respect, the user's attention is drawn to the risks associated 00026 * with loading, using, modifying and/or developing or reproducing the 00027 * software by the user in light of its specific status of free software, 00028 * that may mean that it is complicated to manipulate, and that also 00029 * therefore means that it is reserved for developers and experienced 00030 * professionals having in-depth computer knowledge. Users are therefore 00031 * encouraged to load and test the software's suitability as regards their 00032 * requirements in conditions enabling the security of their systems and/or 00033 * data to be ensured and, more generally, to use and operate it in the 00034 * same conditions as regards security. 00035 * 00036 * The fact that you are presently reading this means that you have had 00037 * knowledge of the CeCILL license and that you accept its terms. 00038 * 00039 */ 00040 00041 #ifndef FILEREQUEST_H_ 00042 #define FILEREQUEST_H 00043 #include "User.h" 00044 #include "FileStatus.h" 00045 #include "UsersController.h" 00046 #include "log4cxx/logger.h" 00047 00048 namespace treqs { 00049 00050 /* 00051 * This class represents a file request. 00052 */ 00053 class FileRequest { 00054 public: 00056 FileRequest(); 00058 virtual ~FileRequest(); 00060 FileRequest(const FileRequest & f); 00061 00063 unsigned long getId(); 00065 std::string getName(); 00067 void setId(unsigned long i); 00069 void setName(std::string n); 00071 User *getClient() const; 00073 void setClient(User *Client); 00075 FileStatus getStatus() const; 00077 void setStatus(FileStatus); 00079 void setNbTries(int); 00081 int getNbTries(); 00082 00083 bool operator==(FileRequest &fr1) const; 00084 00085 private: 00087 unsigned long Id; 00089 std::string Name; 00091 User* Client; 00093 FileStatus Status; 00095 int NbTries; 00096 00097 }; 00098 00099 } 00100 00101 #endif /* FILEREQUEST_H_ */