9 #include "Raym/Raym.h"
\r
12 #include "ry0/device/TunerFactory.h"
\r
14 #include "ry0/iPTd/Reservation.h"
\r
15 #include "ry0/iPTd/Streaming.h"
\r
16 #include "ry0/iPTd/HTTPD.h"
\r
18 #define VERSION "1.00"
\r
26 typedef struct tm TM;
\r
27 typedef struct sockaddr SOCKADDR;
\r
28 typedef struct sockaddr_in SOCKADDR_IN;
\r
29 typedef struct _stat STAT;
\r
31 class Controller : public Raym::Application,
\r
32 public Raym::TimerDelegate
\r
39 static const char * _plist_prefix;
\r
40 Raym::String * _system_path; // システムパス(実行ファイルが配置されているディレクトリ)
\r
41 Raym::String * _props_path; // プロパティファイルのパス
\r
42 Raym::Dictionary * _props; // プロパティ
\r
43 Raym::String * _status_path; // ステータスファイルのパス
\r
44 Raym::Dictionary * _status; // ステータス
\r
45 int _idle_count; // アイドルカウンタ
\r
47 Raym::Timer * _timer_restart; // 再開処理用
\r
49 Reservation * _reservation; // 予約録画制御
\r
50 Streaming * _streaming; // ストリーミング制御
\r
51 HTTPD * _httpd; // HTTP制御
\r
53 bool _initialized; // 初期化済み
\r
54 HMODULE _multi2_dll;
\r
57 ry0::device::Tuner * _tuners[ry0::device::MAX_TUNERS];
\r
60 static Controller *alloc();
\r
64 static void getTimeWithString(Raym::String *str, time_t *time_var);
\r
65 static void getTimeWithEPG(Raym::Dictionary *epg, time_t *start, time_t *end);
\r
67 // タイマ満了IF (from Timer)
\r
68 void timerExpired(Raym::Timer *timer, void *userInfo);
\r
71 void scanChannel(int tuner);
\r
72 int getChannel(int tuner);
\r
73 bool setChannel(int tuner, int channel);
\r
76 bool isTunerInitialized(int tuner);
\r
77 bool isTunerEnabled(int tuner);
\r
78 bool isChannelEnabled(int tuner, int channel);
\r
79 Raym::Array *stationInfos(ry0::device::Tuner::Type type);
\r
80 Raym::String *stationName(ry0::device::Tuner::Type type, int channel);
\r
81 Raym::Array *programsForServices(Raym::Array *services);
\r
82 Raym::String *Controller::stationNameForServiceID(Raym::String *service_id);
\r
86 void systemWillSuspend();
\r
87 void systemResumed();
\r
89 void detectNonIdle();
\r
91 bool canTerminate();
\r