]> Dogcows Code - chaz/thecheat/blob - Cheater.m
The Cheat 1.2
[chaz/thecheat] / Cheater.m
1
2 // **********************************************************************
3 // The Cheat - A universal game cheater for Mac OS X
4 // (C) 2003-2005 Chaz McGarvey (BrokenZipper)
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 1, or (at your option)
9 // any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 //
20
21 #import "LocalCheater.h"
22
23
24 @implementation Cheater
25
26
27 // #############################################################################
28 #pragma mark Initialization
29 // #############################################################################
30
31 - (id)initWithDelegate:(id)delegate
32 {
33 if ( self = [self init] ) {
34 // set the delegate
35 [self setDelegate:delegate];
36 ChazLog( @"init Cheater %p", self );
37 }
38 return self;
39 }
40
41 - (void)dealloc
42 {
43 ChazLog( @"dealloc Cheater %p", self );
44 [super dealloc];
45 }
46
47
48 - (id)delegate
49 {
50 return _delegate;
51 }
52
53 - (void)setDelegate:(id)delegate
54 {
55 // make sure the delegate is not nil and that it conforms to the CheaterDelegate
56 if ( [delegate conformsToProtocol:@protocol(CheaterDelegate)] ) {
57 _delegate = delegate;
58 }
59 else {
60 _delegate = nil;
61 }
62 }
63
64
65 - (BOOL)isConnected
66 {
67 return _isConnected;
68 }
69
70 - (BOOL)isAuthenticated
71 {
72 return _isAuthenticated;
73 }
74
75 - (NSString *)hostAddress
76 {
77 return @"";
78 }
79
80
81 // #############################################################################
82 #pragma mark Cheating Control
83 // #############################################################################
84
85 - (void)connect
86 {
87 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
88 NSStringFromClass(isa),
89 NSStringFromSelector(_cmd)];
90 }
91
92 - (void)disconnect
93 {
94 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
95 NSStringFromClass(isa),
96 NSStringFromSelector(_cmd)];
97 }
98
99 - (void)authenticateWithPassword:(NSString *)password
100 {
101 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
102 NSStringFromClass(isa),
103 NSStringFromSelector(_cmd)];
104 }
105
106
107 - (void)getProcessList
108 {
109 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
110 NSStringFromClass(isa),
111 NSStringFromSelector(_cmd)];
112 }
113
114
115 - (void)setTarget:(Process *)target
116 {
117 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
118 NSStringFromClass(isa),
119 NSStringFromSelector(_cmd)];
120 }
121
122 - (void)pauseTarget
123 {
124 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
125 NSStringFromClass(isa),
126 NSStringFromSelector(_cmd)];
127 }
128
129 - (void)resumeTarget
130 {
131 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
132 NSStringFromClass(isa),
133 NSStringFromSelector(_cmd)];
134 }
135
136
137 - (void)limitReturnedResults:(unsigned)limit
138 {
139 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
140 NSStringFromClass(isa),
141 NSStringFromSelector(_cmd)];
142 }
143
144 - (void)searchForVariable:(Variable *)data comparison:(TCSearchOperator)op
145 {
146 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
147 NSStringFromClass(isa),
148 NSStringFromSelector(_cmd)];
149 }
150
151 - (void)searchLastValuesComparison:(TCSearchOperator)op
152 {
153 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
154 NSStringFromClass(isa),
155 NSStringFromSelector(_cmd)];
156 }
157
158 - (void)cancelSearch
159 {
160 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
161 NSStringFromClass(isa),
162 NSStringFromSelector(_cmd)];
163 }
164
165 - (void)clearSearch
166 {
167 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
168 NSStringFromClass(isa),
169 NSStringFromSelector(_cmd)];
170 }
171
172 - (void)getMemoryDump
173 {
174 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
175 NSStringFromClass(isa),
176 NSStringFromSelector(_cmd)];
177 }
178
179 - (void)cancelMemoryDump
180 {
181 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
182 NSStringFromClass(isa),
183 NSStringFromSelector(_cmd)];
184 }
185
186
187 - (void)makeVariableChanges:(NSArray *)variables repeat:(BOOL)doRepeat interval:(NSTimeInterval)repeatInterval
188 {
189 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
190 NSStringFromClass(isa),
191 NSStringFromSelector(_cmd)];
192 }
193
194 - (void)stopChangingVariables
195 {
196 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
197 NSStringFromClass(isa),
198 NSStringFromSelector(_cmd)];
199 }
200
201
202 - (void)undo
203 {
204 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
205 NSStringFromClass(isa),
206 NSStringFromSelector(_cmd)];
207 }
208
209 - (void)redo
210 {
211 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
212 NSStringFromClass(isa),
213 NSStringFromSelector(_cmd)];
214 }
215
216
217 - (void)watchVariablesAtIndex:(unsigned)index count:(unsigned)count interval:(NSTimeInterval)checkInterval
218 {
219 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
220 NSStringFromClass(isa),
221 NSStringFromSelector(_cmd)];
222 }
223
224 - (void)stopWatchingVariables
225 {
226 [NSException raise:@"TCNotImplemented" format:@"The subclass of Cheater (%@) needs to implement selector %@.",
227 NSStringFromClass(isa),
228 NSStringFromSelector(_cmd)];
229 }
230
231
232 @end
This page took 0.046096 seconds and 5 git commands to generate.