OSDN Git Service

EPG予約、キーワード予約の不具合修正
[iptd/iPTd.git] / src / Raym / Application.cpp
index 2b16e0f..e92fcd1 100644 (file)
@@ -11,6 +11,9 @@
 # pragma comment(lib, "comsupp.lib")\r
 # pragma comment(lib, "credui.lib")\r
 \r
+#include <PowrProf.h>\r
+# pragma comment(lib, "PowrProf.lib")\r
+\r
 // #include "Resource.h" --\r
 #define IDS_APP_TITLE           103\r
 \r
@@ -416,6 +419,13 @@ void Application::resetCounter()
     _counter = 0;\r
 }\r
 \r
+void Application::sleep()\r
+{\r
+    _counter = 0;\r
+\r
+    SetSuspendState(FALSE, FALSE, FALSE);\r
+}\r
+\r
 void Application::suspend()\r
 {\r
     _counter = 0;\r
@@ -447,6 +457,18 @@ void Application::suspend()
     SetSystemPowerState(FALSE, FALSE);\r
 }\r
 \r
+void Application::shutdown()\r
+{\r
+    _counter = 0;\r
+\r
+    system("shutdown /s");\r
+\r
+    deleteNotifyIcon();\r
+    DestroyWindow(_wnd);\r
+\r
+    DebugLog0("will terminate");\r
+}\r
+\r
 bool Application::addNotifyIcon()\r
 {\r
     NOTIFYICONDATA nid;\r