ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/DecentralizedMedia/DecentralizedMedia.cpp
(Generate patch)

Comparing DecentralizedMedia/DecentralizedMedia.cpp (file contents):
Revision 468 by douglas, 2005-06-07T16:38:52-07:00 vs.
Revision 469 by douglas, 2005-06-07T18:51:50-07:00

# Line 4 | Line 4
4   //
5   // $Id$
6  
7 + #include <menes-api/console.hpp>
8 + #include <menes-api/process.hpp>
9 + #include <menes-api/threads.hpp>
10   #include <menes-app/simple.hpp>
11 + #include <menes-etl/fnbind.hpp>
12 + #include <menes-ios/helpers.hpp>
13  
14   #include "BeepRemote.hpp"
15  
16 < int Main(const app::Options& options)
16 > class DecentralizedMedia
17   {
18 + public:
19          BeepRemote bmp;
20 + private:
21 +        _H<api::Process> process;
22 +        int Destroy() { return process->Join(); }
23 + public:
24 +        DecentralizedMedia() : process(bmp.IsRunning() ? NULL : new api::Process("/usr/X11R6/bin/beep-media-player")) {}
25 +        ~DecentralizedMedia()
26 +        {
27 +                if (!process.IsEmpty())
28 +                {
29 +                        _H<api::Thread> thread(new api::Thread(etl::BindAll(&DecentralizedMedia::Destroy, this)));
30 +
31 +                        bmp.Quit();
32 +
33 +                        thread->Join();
34 +                }
35 +        }
36 + };
37 +
38 + int Main(const app::Options& options)
39 + {
40 +        DecentralizedMedia media;
41 +        ext::String command;
42 +
43 +        while (ios::ReadLine(api::Cin, command))
44 +        {
45 +        }
46  
47          return 0;
48   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines