// // PhoneEmulator.m // Cidney // // Created by Chris Karr on 1/11/08. // Copyright 2008 __MyCompanyName__. All rights reserved. // #import "PhoneEmulator.h" #import "Dispatcher.h" #import #import "Caller.h" @implementation PhoneEmulator @synthesize timer; @synthesize enabled; - (void) awakeFromNib { // self.timer = [NSTimer scheduledTimerWithTimeInterval:20.0 target:self selector:@selector(fire:) userInfo:nil repeats:YES]; } - (void) fire:(NSTimer *) theTimer { // NSArray * people = [[ABAddressBook sharedAddressBook] people]; // int rand = random () % [people count]; // ABPerson * person = [people objectAtIndex:rand]; Caller * dict = [Caller dictionary]; [dict setValue:[NSDate date] forKey:TIME_KEY]; [dict setValue:@"Unknown Caller" forKey:NAME_KEY]; [dict setValue:@"1234567890" forKey:NUMBER_KEY]; // [dict setValue:person forKey:PERSON_KEY]; [[NSNotificationCenter defaultCenter] postNotificationName:INCOMING_CALL object:self userInfo:dict]; } @end