ProcessList.h 1.71 KB
Newer Older
Hisham Muhammad's avatar
Hisham Muhammad committed
1
/* Do not edit this file. It was automatically generated. */
Hisham Muhammad's avatar
Hisham Muhammad committed
2
3
4
5

#ifndef HEADER_ProcessList
#define HEADER_ProcessList
/*
Hisham Muhammad's avatar
Hisham Muhammad committed
6
htop - ProcessList.h
Hisham Muhammad's avatar
Hisham Muhammad committed
7
(C) 2004,2005 Hisham H. Muhammad
Hisham Muhammad's avatar
Hisham Muhammad committed
8
9
10
11
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/

12
#include "Vector.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
13
#include "Hashtable.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
14
#include "UsersTable.h"
15
#include "Panel.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
16
#include "Process.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
17
#include "Settings.h"
18

Hisham Muhammad's avatar
Hisham Muhammad committed
19
20
21
22
#ifndef MAX_NAME
#define MAX_NAME 128
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
23
#ifndef MAX_READ
24
#define MAX_READ 2048
Hisham Muhammad's avatar
Hisham Muhammad committed
25
26
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
27
typedef struct ProcessList_ {
Hisham Muhammad's avatar
Hisham Muhammad committed
28
29
   Settings* settings;

30
31
   Vector* processes;
   Vector* processes2;
Hisham Muhammad's avatar
Hisham Muhammad committed
32
33
34
   Hashtable* processTable;
   UsersTable* usersTable;

35
   Panel* panel;
36
   int following;
37
38
   uid_t userId;
   const char* incFilter;
39
   Hashtable* pidWhiteList;
40

41
   #ifdef HAVE_LIBHWLOC
42
43
44
   hwloc_topology_t topology;
   bool topologyOk;
   #endif
Hisham Muhammad's avatar
Hisham Muhammad committed
45
46

   int cpuCount;
Hisham Muhammad's avatar
Hisham Muhammad committed
47
48
49

} ProcessList;

Hisham Muhammad's avatar
Hisham Muhammad committed
50
ProcessList* ProcessList_new(UsersTable* ut, Hashtable* pidWhiteList, uid_t userId);
51
void ProcessList_delete(ProcessList* pl);
52
53
void ProcessList_scan(ProcessList* pl);

54

Hisham Muhammad's avatar
Hisham Muhammad committed
55
ProcessList* ProcessList_init(ProcessList* this, UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
Hisham Muhammad's avatar
Hisham Muhammad committed
56

57
void ProcessList_done(ProcessList* this);
Hisham Muhammad's avatar
Hisham Muhammad committed
58

59
60
void ProcessList_setPanel(ProcessList* this, Panel* panel);

61
void ProcessList_printHeader(ProcessList* this, RichString* header);
Hisham Muhammad's avatar
Hisham Muhammad committed
62

63
64
65
66
void ProcessList_add(ProcessList* this, Process* p);

void ProcessList_remove(ProcessList* this, Process* p);

Hisham Muhammad's avatar
Hisham Muhammad committed
67
Process* ProcessList_get(ProcessList* this, int idx);
Hisham Muhammad's avatar
Hisham Muhammad committed
68
69
70
71
72

int ProcessList_size(ProcessList* this);

void ProcessList_sort(ProcessList* this);

73
74
ProcessField ProcessList_keyAt(ProcessList* this, int at);

75
76
void ProcessList_expandTree(ProcessList* this);

Hisham Muhammad's avatar
Hisham Muhammad committed
77
void ProcessList_rebuildPanel(ProcessList* this);
78

79

Hisham Muhammad's avatar
Hisham Muhammad committed
80
#endif