syswindow  1.0
syswin_client.h
Go to the documentation of this file.
1 /*************************************************************************
2 *
3 * EKOMSYS CONFIDENTIAL
4 * __________________
5 *
6 * [2016] Ekomsys, LLC
7 * All Rights Reserved.
8 *
9 * Developer: Sarbjit Singh
10 *
11 * NOTICE: All information contained herein is, and remains
12 * the property of Ekomsys, LLC if any. The intellectual and
13 * technical concepts contained herein are proprietary to Ekomsys LLC
14 * and its suppliers and may be covered by U.S. and Foreign Patents,
15 * patents in process, and are protected by trade secret or copyright law.
16 * Dissemination of this information or reproduction of this material
17 * is strictly forbidden unless prior written permission is obtained
18 * from Ekomsys, LLC.
19 **************************************************************************/
20 
21 #ifndef __SW_CLIENT_H__
22 #define __SW_CLIENT_H__
23 
24 #include <string>
25 
26 #ifdef _WIN32
27 
28 #ifdef SW_DLL
29 #define SYSWIN_API __declspec( dllexport )
30 #else
31 #define SYSWIN_API __declspec( dllimport )
32 #endif
33 
34 #else
35 #define SYSWIN_API
36 #endif
37 
38 namespace ekomsys
39 {
40 
41 /*****************************************************************************
42 * ENUMS
43 *****************************************************************************/
45 {
47  SW_FAILURE = -100,
53 typedef SYSWIN_API enum WidgetType_
54 {
62 }WidgetType;
63 /*****************************************************************************
64 * INTERFACE CLASS
65 *****************************************************************************/
67 {
68 public:
69  SysWinClient(void);
70  ~SysWinClient(void);
71 
79  SysWinErrorCode ConnectServer(std::string ip, std::string port);
80 
91  SysWinErrorCode Authenticate(std::string user, std::string password);
92 
105  SysWinErrorCode AddModule(std::string module_id, std::string name);
106 
120  SysWinErrorCode AddWidget(std::string module_id, std::string widget_id, WidgetType type, std::string name);
121 
131  SysWinErrorCode UpdateLineChartWidget(std::string module_id, std::string widget_id, float x, float y);
132 
141  SysWinErrorCode UpdateSingleValueWidget(std::string module_id, std::string widget_id, std::string value);
142 
152  SysWinErrorCode UpdateProgressBarWidget(std::string module_id, std::string widget_id, double value, double max_value);
153 
163  SysWinErrorCode UpdatePieChartWidget(std::string module_id, std::string widget_id, std::string label, double value);
164 
174  SysWinErrorCode UpdateBarChartWidget(std::string module_id, std::string widget_id, std::string label, double value);
175 
184  SysWinErrorCode UpdateListWidget(std::string module_id, std::string widget_id, std::string text);
185 
197  SysWinErrorCode UpdateImageWidget(std::string module_id, std::string widget_id, void* data, int width, int height, int bpp);
198 
208  SysWinErrorCode UpdateImageWidget(std::string module_id, std::string widget_id, std::string path);
209 
218  SysWinErrorCode AddProcessorCountWidget(std::string module_id, std::string widget_id, std::string name);
219 
226  SysWinErrorCode AddSystemNameWidget(std::string module_id, std::string widget_id, std::string name);
227 
236  SysWinErrorCode AddLoggedInUserWidget(std::string module_id, std::string widget_id, std::string name);
237 
247  SysWinErrorCode AddTotalSystemMemoryWidget(std::string module_id, std::string widget_id, std::string name);
248 
255  SysWinErrorCode AddAvailableSystemMemoryWidget(std::string module_id, std::string widget_id, std::string name, long update_interval_secs);
256 
265  SysWinErrorCode AddOSNameWidget(std::string module_id, std::string widget_id, std::string name);
266 
276  SysWinErrorCode AddProcessMemoryUsageWidget(std::string module_id, std::string widget_id, std::string name, long pid, long update_interval_secs);
277 
287  SysWinErrorCode AddProcessThreadUsageWidget(std::string module_id, std::string widget_id, std::string name, long pid, long update_interval_secs);
288 
298  SysWinErrorCode AddProcessCPUUsageWidget(std::string module_id, std::string widget_id, std::string name, long pid, long update_interval_secs);
299 
309  SysWinErrorCode AddProcessHandleCountWidget(std::string module_id, std::string widget_id, std::string name, long pid, long update_interval_secs);
310 
318  std::string GetProcessName(long pid);
319 
325  long GetProcessID();
326 
334  std::string GetProcessFullPath(long pid);
335 
343  std::string GetArchitecture(long pid);
344 
345 private:
346  class Impl;
347  Impl* impl_;
348 };
349 /*****************************************************************************/
350 }
351 #endif
352 
WidgetType_
Definition: syswin_client.h:53
Definition: syswin_client.h:56
Definition: syswin_client.h:66
SYSWIN_API enum ekomsys::WidgetType_ WidgetType
Definition: syswin_client.h:57
Definition: syswin_client.h:50
#define SYSWIN_API
Definition: syswin_client.h:35
Definition: syswin_client.h:60
SysWinErrorCode
Definition: syswin_client.h:44
Definition: syswin_client.h:47
Definition: syswin_client.h:38
Definition: syswin_client.h:55
Definition: syswin_client.h:49
Definition: syswin_client.h:51
Definition: syswin_client.h:58
Definition: syswin_client.h:46
Definition: syswin_client.h:61
Definition: syswin_client.h:48
Definition: syswin_client.h:59