Changeset 11915

Show
Ignore:
Timestamp:
05/18/08 19:50:52 (5 years ago)
Author:
akio0911
Message:

add PlaceEngine? support

Location:
platform/DennouMegane
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • platform/DennouMegane/Downloader.h

    r11854 r11915  
    33#import <Cocoa/Cocoa.h> 
    44 
    5 #define PLACEENGINE_KEY "We2beL1Y3xi0oK.OdluF2iKiaxfPk7funfjAl-xc7Z4Bl.Y27o5r95CtQK0R8Kokdsn9sNQR8IKtXBu9iTDjuasXyxQTrGLvLahV6pStKKbwpsGcIf1g2MIdNtSgI4pOBGlU-jZTEXgJfHh9YSEId7uBNFFf.96.zqYyTd2fqXmHjSJ4hRhlleFdinmEJFod7zNusIh45W7ZWtNYVnrL2G6-OlJMGaNCG.QvFPU5Esahrrk4RSWdopaWBUK7oVKbJ4Mju66UkyOnFsgEnyQjOLL.h3fjbjmqBLvTZLT0aAnp8DtKnvHhlWLY0p8m8E7f5EVtXJiAUdGUR2o96ipX0g__,aHRtbFRlc3Q_,aHRtbFRlc3Q_" 
     5#define PLACEENGINE_KEY "kMqBhbICR8rJMqdWrZar0x.IFguEZ01eme6NPDyhfyLoDyUKZ6FWO-T3IV44gVpQzXbDTy5yAxjcm1OPnf1.fyURIU7I1UiKYkqtKbXRcGMhUbmUGkjBasaAptJHzQW.OejqfTUisuLY2kJOqdKjG6nxUnvhpoq6-Eu6RKQnmvS.jKOfHlgHqA2UKmoANs2--XrFgwnvqO-kyAdFI.2hZ1V2d5YW-kUcygKoP7VURFGo0PYBRAJUpH7VKqlXSQ79L0o.IllQNDDxjHNZ-I3gyjtxTpyMTu57-pCusdHPKgb1SEU8cSZI6TH9gVsXab.0C9XX8.iPbvY0HgfeugBmbA__,Q29jb2FBbmltZUNhbWVyYQ__,Q29jb2FBbmltZUNhbWVyYQ__" 
    66 
    77@interface Downloader : NSObject 
  • platform/DennouMegane/MenuView.m

    r11878 r11915  
    8282        [NSThread detachNewThreadSelector:@selector(MyInstanceThreadMethod2:)  
    8383                toTarget:self withObject:self]; 
     84        [NSThread detachNewThreadSelector:@selector(MyInstanceThreadMethod3:)  
     85                toTarget:self withObject:self]; 
    8486 
    8587         [NSTimer scheduledTimerWithTimeInterval:1.0 / 30.0 
     
    8991                                     repeats:YES 
    9092     ]; 
    91          [[WifiGetter alloc] initWifiWithDelegate:self]; 
     93         [NSTimer scheduledTimerWithTimeInterval:10.0 
     94                                      target:self 
     95                                    selector:@selector( timerAdjustWindowSize2:) 
     96                                    userInfo:nil 
     97                                     repeats:YES 
     98     ]; 
    9299}  
    93100 
     
    415422 
    416423        //////////////////////////////////////////////////////////////////////////////////// 
     424        [pool release]; 
     425} 
     426 
     427- (void)MyInstanceThreadMethod3:(id)param 
     428{ 
     429        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 
     430         
     431        while(1){ 
     432                [[WifiGetter alloc] initWifiWithDelegate:self]; 
     433                struct timespec treq, trem; 
     434                treq.tv_sec = (time_t)10; 
     435                treq.tv_nsec = 0; 
     436                nanosleep(&treq, &trem); 
     437        } 
     438 
    417439        [pool release]; 
    418440} 
     
    517539} 
    518540 
     541- (void)timerAdjustWindowSize2:( NSTimer *)aTimer 
     542{ 
     543        [[WifiGetter alloc] initWifiWithDelegate:self]; 
     544} 
     545 
    519546- (void)setText:(NSString*)addr aLongitude:(NSString*)longitude aLatitude:(NSString*)latitude aMessage:(NSString*)msg 
    520547{ 
     
    523550        NSLog(@"longitude = %@", longitude); 
    524551        NSLog(@"msg = %@", msg); 
    525         currentLocationLayer.string=[NSString stringWithFormat:@"%@\nxxx", addr]; 
     552        currentLocationLayer.string=[NSString stringWithFormat:@"%@\n%@ : %@", addr, latitude, longitude]; 
    526553} 
    527554