Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIIdleService.idl
3 : */
4 :
5 : #ifndef __gen_nsIIdleService_h__
6 : #define __gen_nsIIdleService_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIObserver; /* forward declaration */
18 :
19 :
20 : /* starting interface: nsIIdleService */
21 : #define NS_IIDLESERVICE_IID_STR "cc52f19a-63ae-4a1c-9cc3-e79eace0b471"
22 :
23 : #define NS_IIDLESERVICE_IID \
24 : {0xcc52f19a, 0x63ae, 0x4a1c, \
25 : { 0x9c, 0xc3, 0xe7, 0x9e, 0xac, 0xe0, 0xb4, 0x71 }}
26 :
27 1 : class NS_NO_VTABLE nsIIdleService : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIDLESERVICE_IID)
31 :
32 : /* readonly attribute unsigned long idleTime; */
33 : NS_IMETHOD GetIdleTime(uint32_t *aIdleTime) = 0;
34 :
35 : /* void addIdleObserver (in nsIObserver observer, in unsigned long time); */
36 : NS_IMETHOD AddIdleObserver(nsIObserver *observer, uint32_t time) = 0;
37 :
38 : /* void removeIdleObserver (in nsIObserver observer, in unsigned long time); */
39 : NS_IMETHOD RemoveIdleObserver(nsIObserver *observer, uint32_t time) = 0;
40 :
41 : };
42 :
43 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIIdleService, NS_IIDLESERVICE_IID)
44 :
45 : /* Use this macro when declaring classes that implement this interface. */
46 : #define NS_DECL_NSIIDLESERVICE \
47 : NS_IMETHOD GetIdleTime(uint32_t *aIdleTime) override; \
48 : NS_IMETHOD AddIdleObserver(nsIObserver *observer, uint32_t time) override; \
49 : NS_IMETHOD RemoveIdleObserver(nsIObserver *observer, uint32_t time) override;
50 :
51 : /* Use this macro when declaring the members of this interface when the
52 : class doesn't implement the interface. This is useful for forwarding. */
53 : #define NS_DECL_NON_VIRTUAL_NSIIDLESERVICE \
54 : nsresult GetIdleTime(uint32_t *aIdleTime); \
55 : nsresult AddIdleObserver(nsIObserver *observer, uint32_t time); \
56 : nsresult RemoveIdleObserver(nsIObserver *observer, uint32_t time);
57 :
58 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
59 : #define NS_FORWARD_NSIIDLESERVICE(_to) \
60 : NS_IMETHOD GetIdleTime(uint32_t *aIdleTime) override { return _to GetIdleTime(aIdleTime); } \
61 : NS_IMETHOD AddIdleObserver(nsIObserver *observer, uint32_t time) override { return _to AddIdleObserver(observer, time); } \
62 : NS_IMETHOD RemoveIdleObserver(nsIObserver *observer, uint32_t time) override { return _to RemoveIdleObserver(observer, time); }
63 :
64 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
65 : #define NS_FORWARD_SAFE_NSIIDLESERVICE(_to) \
66 : NS_IMETHOD GetIdleTime(uint32_t *aIdleTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdleTime(aIdleTime); } \
67 : NS_IMETHOD AddIdleObserver(nsIObserver *observer, uint32_t time) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddIdleObserver(observer, time); } \
68 : NS_IMETHOD RemoveIdleObserver(nsIObserver *observer, uint32_t time) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveIdleObserver(observer, time); }
69 :
70 : #if 0
71 : /* Use the code below as a template for the implementation class for this interface. */
72 :
73 : /* Header file */
74 : class nsIdleService : public nsIIdleService
75 : {
76 : public:
77 : NS_DECL_ISUPPORTS
78 : NS_DECL_NSIIDLESERVICE
79 :
80 : nsIdleService();
81 :
82 : private:
83 : ~nsIdleService();
84 :
85 : protected:
86 : /* additional members */
87 : };
88 :
89 : /* Implementation file */
90 : NS_IMPL_ISUPPORTS(nsIdleService, nsIIdleService)
91 :
92 : nsIdleService::nsIdleService()
93 : {
94 : /* member initializers and constructor code */
95 : }
96 :
97 : nsIdleService::~nsIdleService()
98 : {
99 : /* destructor code */
100 : }
101 :
102 : /* readonly attribute unsigned long idleTime; */
103 : NS_IMETHODIMP nsIdleService::GetIdleTime(uint32_t *aIdleTime)
104 : {
105 : return NS_ERROR_NOT_IMPLEMENTED;
106 : }
107 :
108 : /* void addIdleObserver (in nsIObserver observer, in unsigned long time); */
109 : NS_IMETHODIMP nsIdleService::AddIdleObserver(nsIObserver *observer, uint32_t time)
110 : {
111 : return NS_ERROR_NOT_IMPLEMENTED;
112 : }
113 :
114 : /* void removeIdleObserver (in nsIObserver observer, in unsigned long time); */
115 : NS_IMETHODIMP nsIdleService::RemoveIdleObserver(nsIObserver *observer, uint32_t time)
116 : {
117 : return NS_ERROR_NOT_IMPLEMENTED;
118 : }
119 :
120 : /* End of implementation class template. */
121 : #endif
122 :
123 : /**
124 : * Observer topic notification for idle window: OBSERVER_TOPIC_IDLE.
125 : * Observer topic notification for active window: OBSERVER_TOPIC_ACTIVE.
126 : */
127 :
128 : #define OBSERVER_TOPIC_IDLE "idle"
129 : #define OBSERVER_TOPIC_ACTIVE "active"
130 : #define OBSERVER_TOPIC_IDLE_DAILY "idle-daily"
131 :
132 : #endif /* __gen_nsIIdleService_h__ */
|