00001 /* 00002 * Copyright (C) 2009, Edmundo Albuquerque de Souza e Silva. 00003 * 00004 * This file may be distributed under the terms of the Q Public License 00005 * as defined by Trolltech AS of Norway and appearing in the file 00006 * LICENSE.QPL included in the packaging of this file. 00007 * 00008 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 00009 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00010 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00012 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00013 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00014 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 * 00016 */ 00017 00018 /////////////////////////////////////////////////////////////////////////////// 00019 // COMIT - CNPq 00020 // UFRJ 00021 // RIO Multimedia Storage Server 00022 // 00023 // Authors: Bernardo Calil Machado Netto and Melba Lima Gorza 00024 // 00025 /////////////////////////////////////////////////////////////////////////////// 00026 00027 #ifndef __PLOBJECTMANAGER_H_ 00028 #define __PLOBJECTMANAGER_H_ 00029 00030 class PLObjectManager; 00031 00032 #include <stdlib.h> 00033 00034 //Start - GCC 3 00035 #include <iostream> 00036 using namespace std; 00037 //End - GCC 3 00038 00039 #include "RioInterface.h" 00040 #include "RioError.h" 00041 #include "DataConversion.h" 00042 #include "RioInterfaceTypes.h" 00043 00044 /////////////////////////////////////////////////////////////////////////////// 00045 // PLObjectManager 00046 class PLObjectManager 00047 { 00048 public: 00049 // Agora o construtor da classe PLObjectManager possuira um parametro, 00050 // do tipo (char *), que contera o nome do diretorio onde o log deve 00051 // ser salvo. 00052 PLObjectManager( char *LogsDirectory ); 00053 ~PLObjectManager(); 00054 00055 HRESULT Close( unsigned int* ResultSize, 00056 CRioObject *ObjectRioServer ); 00057 00058 //This function was modified to send client's ip 00059 RioResult PrefetchBlock( int block, 00060 unsigned int BlockSize, 00061 RioRequest* RequestRioServer, 00062 CRioObject *ObjectRioServer, 00063 int ip, 00064 RioStreamType traffic = UNICASTTRAFFIC, // default unicast 00065 int port = 0 ); 00066 00067 private: 00068 ofstream m_log; 00069 00070 //This function was modified to send client's ip 00071 RioResult Read( RioBlock Block, 00072 CRioObject *ObjectRioServer, 00073 RioRequest* Request, 00074 int ip , 00075 RioStreamType traffic = UNICASTTRAFFIC,// default unicast 00076 int port = 0 ); 00077 00078 }; 00079 #endif //__PLOBJECTMANAGER_H_