ServiceRequest.hpp

Go to the documentation of this file.
00001 /*
00002 Copyright 2007, 2008, 2009, 2010, 2011 Instituto de Sistemas e Robotica, Instituto Superior Tecnico
00003 
00004 This file is part of MeRMaID.
00005 
00006 MeRMaID is free software: you can redistribute it and/or modify
00007 it under the terms of the GNU Lesser General Public License as published by
00008 the Free Software Foundation, either version 3 of the License, or
00009 (at your option) any later version.
00010 
00011 MeRMaID is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU Lesser General Public License for more details.
00015 
00016 You should have received a copy of the GNU Lesser General Public License
00017 along with MeRMaID.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 
00020 
00021 
00022 /**
00023  * @Filename ServiceRequest.hpp
00024  * @Description ServiceRequest declaration
00025  * @Status Work in Progress
00026  * @Version $Id: ServiceRequest.hpp 1 2011-03-04 18:13:18Z jreis $
00027  * @Maintainer
00028  */
00029 
00030 
00031 #ifndef __SERVICE_SERVICEREQUEST_H
00032 #define __SERVICE_SERVICEREQUEST_H
00033 
00034 namespace mermaid
00035 {
00036   namespace support
00037   {
00038     namespace service
00039     {
00040       class ServiceRequest;
00041     }
00042   }
00043 }
00044 
00045 #include <DataBox.hpp>
00046 #include <DataValueVector.hpp>
00047 
00048 
00049 #include "ServiceRequestState.hpp"
00050 
00051 namespace mermaid
00052 {
00053   namespace support
00054   {
00055     namespace service
00056     {
00057     
00058       using mermaid::support::data::DataBox;
00059       using mermaid::support::data::DataValueVector;
00060       using boost::shared_ptr;
00061       
00062       /**
00063       * @Class ServiceRequest ServiceRequest.hpp "ServiceRequest.hpp"
00064       * @Description Class representing a Service Request
00065       * @Author Marco Barbosa
00066       */
00067       class ServiceRequest
00068       {
00069         public:
00070           ServiceRequest (std::string requesterEntityName, std::string requesterServiceName, std::string targetEntityName, std::string targetServiceName, std::string targetServiceInterfaceName, int requestId);
00071           ServiceRequest (const ServiceRequest &sar);
00072           ServiceRequest& operator= (const ServiceRequest &sar);
00073           
00074           std::string getRequesterEntityName();
00075           std::string getRequesterServiceName();
00076           std::string getTargetEntityName();
00077           std::string getTargetServiceName();
00078           std::string getTargetServiceInterfaceName();
00079           int getRequestId();
00080           
00081           shared_ptr<DataBox> getRequestDataBox();
00082           void setRequestDataBox (shared_ptr<DataBox> dataBox);
00083           
00084           ServiceRequestState& getState();
00085           void notifySent();
00086           void notifyReplyReceived();
00087           
00088         private:
00089         
00090           ServiceRequest();
00091           
00092           std::string requesterEntityName_;
00093           std::string requesterServiceName_;
00094           std::string targetEntityName_;
00095           std::string targetServiceName_;
00096           std::string targetServiceInterfaceName_;
00097           int requestId_;
00098           shared_ptr<DataBox> requestDataBox_;
00099           
00100           ServiceRequestState state_;
00101           
00102       }; // class ServiceRequest
00103     } // namespace service
00104   } // namespace support
00105 } // namespace mermaid
00106 #endif // __SERVICE_SERVICEREQUEST_H
Generated on Fri Mar 4 22:14:58 2011 for MeRMaID::support by  doxygen 1.6.3