RSS

(root)/iphone/common : 56 : tappity/source/TappityServer.m

To get this branch, use:
bzr branch /browse/iphone/common

« back to all changes in this revision

Viewing changes to tappity/source/TappityServer.m

Dömötör Gulyás
2009-11-17 20:39:41
Revision ID: dognotdog@gmail.com-20091117193941-33i9rnyzbw3zt56b
CLLocationManager swizzled methods made to work standalone, too, when the server lib is included in device builds

Show diffs side-by-side

added added

removed removed

78
78
        {
79
79
                [[TappityServer sharedServer] setHeadingDelegate: obj];
80
80
        }
 
81
        [self setDelegate_tappity: obj];
 
82
 
81
83
}
82
84
 
83
85
- (void) startUpdatingLocation_tappity
84
86
{
85
87
        [[TappityServer sharedServer] sendData: [NSData data] withIdentifier: kTapStartUpdatingLocation];
 
88
        [self startUpdatingLocation_tappity];
86
89
}
87
90
 
88
91
- (void) stopUpdatingLocation_tappity
89
92
{
90
93
        [[TappityServer sharedServer] sendData: [NSData data] withIdentifier: kTapStopUpdatingLocation];
 
94
        [self stopUpdatingLocation_tappity];
91
95
}
92
96
 
93
97
- (void) startUpdatingHeading_tappity
94
98
{
95
99
        [[TappityServer sharedServer] sendData: [NSData data] withIdentifier: kTapStartUpdatingHeading];
 
100
        [self startUpdatingHeading_tappity];
96
101
}
97
102
 
98
103
- (void) stopUpdatingHeading_tappity
99
104
{
100
105
        [[TappityServer sharedServer] sendData: [NSData data] withIdentifier: kTapStopUpdatingHeading];
 
106
        [self stopUpdatingHeading_tappity];
101
107
}
102
108
 
103
109
 
199
205
        return self;
200
206
}
201
207
 
 
208
- (void) sendData: (NSData*) data withIdentifier: (NSInteger) messageId
 
209
{
 
210
        [messenger sendData: data withIdentifier: messageId];
 
211
}
 
212
 
202
213
- (void) startBonjourServerWithName: (NSString*) name protocol: (NSString*) protocol port: (int) port
203
214
{
204
215
        [messenger startBonjourServerWithName: name protocol: protocol port: port];
206
217
 
207
218
- (void) connectionWasEstablished: (SocketMessenger*) theMessenger
208
219
{
 
220
        if (locationDelegate)
 
221
                [messenger sendData: [NSData data] withIdentifier: kTapStartUpdatingLocation];
 
222
        if (headingDelegate)
 
223
                [messenger sendData: [NSData data] withIdentifier: kTapStartUpdatingHeading];
 
224
 
209
225
        [self performSelectorOnMainThread: @selector(startScreenieTimer) withObject: nil waitUntilDone: NO];
210
226
}
211
227
 

Loggerhead 1.17 is a web-based interface for Bazaar branches