FluteReceiver.h

Go to the documentation of this file.
00001 /*
00002  *   MAD-FLUTE-UNITTEST: FLUTE unit test.
00003  *   File: FluteReceiver.h
00004  *   Copyright (c) 2006-2007 M.B.I. www.mbigroup.it
00005  *   main authors/contacts: gmendola@mbigroup.it and lpoderico@mbigroup.it
00006  *
00007  *   This program is free software; you can redistribute it and/or modify
00008  *   it under the terms of the GNU General Public License as published by
00009  *   the Free Software Foundation; either version 2 of the License, or
00010  *   (at your option) any later version.
00011  *
00012  *   This program is distributed in the hope that it will be useful,
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *   GNU General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU General Public License
00018  *   along with this program; if not, write to the Free Software
00019  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  */
00021 
00022 #ifndef __FLUTERECEIVER__
00023 #define __FLUTERECEIVER__
00024 
00025 #include "flute.h"
00026 
00027 #include <string>
00028 
00029 #include <boost/thread/thread.hpp>
00030 #include <boost/shared_ptr.hpp>
00031 
00032 // Private class
00033 class FluteReceiverThread
00034 {
00035 public:
00036 
00037     FluteReceiverThread();
00038 
00039     void operator() ();
00040 
00041     struct Status
00042     {
00043         int theSessionId;
00044         arguments_t theArguments;
00045     };
00046 
00047     typedef boost::shared_ptr<Status> StatusPtr;
00048 
00049     StatusPtr theStatusPtr;
00050 };
00051 
00053 //
00055 
00059 class FluteReceiver
00060 {
00061 public:
00062     FluteReceiver();
00063 
00064     ~FluteReceiver();
00065 
00066     void startReceiving();
00067 
00068     void operator() ();
00069 
00070     std::string getReceivedPath(const std::string& aName) const;
00071 
00072 private:
00073     boost::thread* theThread;
00074 
00075     FluteReceiverThread theFluteReceiverThread;
00076 };
00077 
00078 #endif //__FLUTERECEIVER__

Generated on Fri Mar 9 20:08:53 2007 for MAD-FCL by  doxygen 1.5.0