]> Dogcows Code - chaz/thecheat/blob - CheatServer.h
The Cheat 1.0b4
[chaz/thecheat] / CheatServer.h
1
2 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 // Project: The Cheat
4 //
5 // File: CheatServer.h
6 // Created: Sun Sep 07 2003
7 //
8 // Copyright: 2003 Chaz McGarvey. All rights reserved.
9 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10
11 #import <Cocoa/Cocoa.h>
12
13 #import "ServerDelegate.h"
14
15 #include <mach/vm_map.h>
16 #include <mach/mach_traps.h>
17
18 #include <malloc/malloc.h>
19
20 #include <sys/types.h>
21 #include <sys/ptrace.h>
22 #include <sys/wait.h>
23 #include <unistd.h>
24
25 #include "cheat_types.h"
26 #include "cheat_net.h"
27
28
29 @class SearchResults;
30
31
32 @interface CheatServer : NSObject
33 {
34 id rootProxy;
35 int sockfd;
36
37 pid_t processID;
38 vm_map_t processTask;
39
40 BOOL processPaused;
41
42 NSMutableArray *searchResults;
43 NSMutableArray *searchResultsUndone;
44 }
45
46 + (NSConnection *)serverWithDelegate:(id)delegate socket:(int)sock;
47 + (void)serverThread:(NSArray *)array;
48
49 - (id)initWithRootProxy:(id)proxy;
50
51 - (void)handleSocket:(int)sock;
52 - (void)run;
53
54 - (void)setAddress:(NSString *)address;
55 - (void)setAction:(NSString *)action;
56
57 - (void)firstSearchString8bit:(char const *)value size:(int)vsize;
58 - (void)firstSearchIntegerChar:(int8_t)value;
59 - (void)firstSearchIntegerShort:(int16_t)value;
60 - (void)firstSearchIntegerLong:(int32_t)value;
61 - (void)firstSearchDecimalFloat:(float)value;
62 - (void)firstSearchDecimalDouble:(double)value;
63
64 - (void)searchString8bit:(char const *)value size:(int)vsize;
65 - (void)searchIntegerChar:(int8_t)value;
66 - (void)searchIntegerShort:(int16_t)value;
67 - (void)searchIntegerLong:(int32_t)value;
68 - (void)searchDecimalFloat:(float)value;
69 - (void)searchDecimalDouble:(double)value;
70
71 - (void)changeString8bit:(char const *)value size:(int)vsize addresses:(TCaddress *)addresses count:(int)count;
72 - (void)changeIntegerChar:(int8_t)value addresses:(TCaddress *)addresses count:(int)count;
73 - (void)changeIntegerShort:(int16_t)value addresses:(TCaddress *)addresses count:(int)count;
74 - (void)changeIntegerLong:(int32_t)value addresses:(TCaddress *)addresses count:(int)count;
75 - (void)changeDecimalFloat:(float)value addresses:(TCaddress *)addresses count:(int)count;
76 - (void)changeDecimalDouble:(double)value addresses:(TCaddress *)addresses count:(int)count;
77
78 - (void)sendProcessList;
79 - (void)sendSearchFinished;
80 - (void)sendVariableList:(TCaddress const *)data amount:(int)amount;
81 - (void)sendChangeFinished;
82 - (void)sendError:(NSString *)msg fatal:(BOOL)fatal;
83 - (void)sendVariableValue:(u_int32_t)index;
84 - (void)sendUndoFinished;
85 - (void)sendRedoFinished;
86 - (void)sendUndoRedoStatus;
87 - (void)sendAppLaunched:(NSDictionary *)appInfo;
88 - (void)sendAppQuit:(NSDictionary *)appInfo;
89 - (void)sendTargetAppQuit;
90 - (void)sendPauseFinished:(BOOL)paused;
91
92 - (void)handleClearSearch;
93 - (void)handleSearch:(char const *)data size:(int)dataSize;
94 - (void)handleChange:(char const *)data size:(int)dataSize;
95 - (void)handlePauseTarget;
96 - (void)handleUndo;
97 - (void)handleRedo;
98 - (void)handleSetTargetPID:(char const *)data size:(int)size;
99
100 - (void)unpause;
101 - (void)setPID:(pid_t)pid;
102
103 @end
104
This page took 0.039838 seconds and 4 git commands to generate.