2005-07-27, 02:45 AM
#include <string>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include "TivoManager.hh"
#include "BeaconManager.hh"
#include "Server.hh"
#include "NowShowingCollector.hh"
#include "ShowDatabase.hh"
using namespace std;
string fake_tivo_name = "TivoServer";
string fake_tivo_id = "3510000D03935AD";
ShowDatabase showDb;
TivoManager tivoManager;
BeaconManager beacon( fake_tivo_id, fake_tivo_name, &tivoManager );
Server server( fake_tivo_id, &showDb );
NowShowingCollector nowShowingColl( fake_tivo_id, &tivoManager, &showDb );
int main(int argc, char **argv)
{
string shows_dir;
passwd *pwent;
pwent = getpwnam( getlogin() );
shows_dir = string(pwent->pw_dir);
shows_dir += "/video";
if( argc > 2 )
{
cout << "\n Useage: tivoserver [Shows Directory]\n" << endl;
return -1;
}
if( argc == 2 )
{
shows_dir = argv[1];
if( shows_dir.size() <= 0 )
{
cout << "\n Useage: tivoserver [Shows Directory]\n" << endl;
return -1;
}
}
if( shows_dir[ shows_dir.size()-1 ] != '/' ) {
shows_dir += '/';
}
if( ! showDb.loadLocalShows( shows_dir ) )
{
return -1;
}
beacon.Start();
server.Start();
// tivoManager.AddTivo("2400000E07B847A", "WestonsTivo", addr);
// nowShowingColl.Start();
while(1) sleep(60);
return 0;
}
It got some source here is there anybody out there that can help apply recursive searching to this app. I would really be grafeful even pay..This app will only search one directory in cygwin home/owner/video..Although I can directory a path to a different dir fine, just looking to scan multiple hdrives for the same file type etc. Anyone know Reven old buddy old pal. Can you help.. Thanks
Darrin75
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include "TivoManager.hh"
#include "BeaconManager.hh"
#include "Server.hh"
#include "NowShowingCollector.hh"
#include "ShowDatabase.hh"
using namespace std;
string fake_tivo_name = "TivoServer";
string fake_tivo_id = "3510000D03935AD";
ShowDatabase showDb;
TivoManager tivoManager;
BeaconManager beacon( fake_tivo_id, fake_tivo_name, &tivoManager );
Server server( fake_tivo_id, &showDb );
NowShowingCollector nowShowingColl( fake_tivo_id, &tivoManager, &showDb );
int main(int argc, char **argv)
{
string shows_dir;
passwd *pwent;
pwent = getpwnam( getlogin() );
shows_dir = string(pwent->pw_dir);
shows_dir += "/video";
if( argc > 2 )
{
cout << "\n Useage: tivoserver [Shows Directory]\n" << endl;
return -1;
}
if( argc == 2 )
{
shows_dir = argv[1];
if( shows_dir.size() <= 0 )
{
cout << "\n Useage: tivoserver [Shows Directory]\n" << endl;
return -1;
}
}
if( shows_dir[ shows_dir.size()-1 ] != '/' ) {
shows_dir += '/';
}
if( ! showDb.loadLocalShows( shows_dir ) )
{
return -1;
}
beacon.Start();
server.Start();
// tivoManager.AddTivo("2400000E07B847A", "WestonsTivo", addr);
// nowShowingColl.Start();
while(1) sleep(60);
return 0;
}
It got some source here is there anybody out there that can help apply recursive searching to this app. I would really be grafeful even pay..This app will only search one directory in cygwin home/owner/video..Although I can directory a path to a different dir fine, just looking to scan multiple hdrives for the same file type etc. Anyone know Reven old buddy old pal. Can you help.. Thanks
Darrin75