Changeset 205


Ignore:
Timestamp:
11/27/05 22:06:28 (14 years ago)
Author:
Nicholas Riley
Message:

LocationDo?.py: Add a bunch of TODOs, and some more locations and
actions.

action.py: Add a TODO.

SCNetworkReachabilitymodule.c: Add a TODO.

Location:
trunk/LocationDo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocationDo/LocationDo.py

    r198 r205  
    3131RE_AIRPORT_STATUS = '/'.join([kSCDynamicStoreDomainState, kSCCompNetwork, kSCCompInterface, kSCCompAnyRegex, kSCEntNetAirPort])
    3232
     33# XXX switch to Cocoa interface for Growl
    3334growl = app('GrowlHelperApp')
    3435
     
    5859currentLocation = Location()
    5960
     61# XXX attach actions to location tag; something like:
     62# locations['Siebel'].onArrive.ensureKerberosPrincipalsValid(...)
     63
    6064def arriveAtLocation(location):
    6165    growlNotify(NOTIFICATION_ARRIVE, 'Arriving at location', location)
     
    6872        action.setDisplayBrightnessPercent(0.2)
    6973        action.setAdiumStatus('Working in 1115 SC')
     74    if '1404 SC' in location:
     75        action.setDisplayBrightnessPercent(0.4)
     76        action.setVolumePercent(0)
     77        action.setAdiumStatus('In 1404 SC')
    7078    if '4111 SC' in location:
    71         action.openInBackground('~/Documents/MSSP/MSSP progress.oo3')
    72         action.terminalDo('kswitch -p njriley@ACM.UIUC.EDU;(sleep 10;kswitch -p njriley@AD.UIUC.EDU)&!;clear;ssh yt')
     79        action.openInBackground('~/Documents/Research/Research progress.oo3')
     80        # XXX wait for yt to be accessible
     81        # XXX start NX
     82        # XXX move windows
     83        action.terminalDo('kswitch -p njriley@ACM.UIUC.EDU;(sleep 10;kswitch -p njriley@AD.UIUC.EDU)&! ;clear;ssh yt')
    7384        action.setDisplayBrightnessPercent(0.9)
    7485        action.setAdiumStatus('Working in 4111 SC')
    7586    if 'ACM office' in location:
    7687        action.setDisplayBrightnessPercent(0.2)
     88        action.setVolumePercent(0.5)
    7789        action.setAdiumStatus('At ACM')
    7890    if 'Champaign' in location:
     
    121133
    122134# XXX watch battery status, too, for display brightness
     135# XXX look at display configuration to tell difference between 4111 and 4124
     136# XXX need concept of ambiguity, ask user which location they're in (ACM/1115)
    123137
    124138airPortStatus = {'BSSID': None, 'SSID': None}
     
    136150                                 '00:0e:83:05:75:d2']:
    137151                        location.add('4111 SC')
     152                    elif bssid in ['00:0e:83:05:75:a2', '00:0e:83:05:75:a0']:
     153                        location.add('1404 SC')
    138154                    elif bssid in ['00:0e:83:05:76:82', '00:0e:83:05:76:80']:
    139155                        location.add('ACM office')
     
    146162                    elif bssid == '00:02:2d:2c:cb:34':
    147163                        location.add('B02 CSL')
     164                    elif bssid == '00:13:c4:78:e1:a0':
     165                        location.add('Engineering Hall')
     166                    elif bssid == '00:0d:93:ed:e0:bc':
     167                        location.add('340 Marlborough St.')
     168                    elif bssid == '00:40:96:5a:5e:0f':
     169                        location.add('BMI baggage claim')
    148170                    elif bssid == '44:44:44:44:44:44':
    149171                        location.add('No AirPort network')
     
    168190                    elif ssid == 'CSL Wireless':
    169191                        location.add('CSL')
     192                    elif ssid == 'Wackyland':
     193                        location.add('340 Marlborough St.')
     194                    elif ssid == 'CIRA':
     195                        location.add('BMI')
    170196                    else:
    171197                        growlNotify(NOTIFICATION_UNKNOWN, 'Unknown SSID', ssid,
  • trunk/LocationDo/SCNetworkReachabilitymodule.c

    r196 r205  
    1818           (flags & kSCNetworkFlagsConnectionAutomatic)));
    1919}
     20
     21/* XXX should have a way to cancel (e.g. on location detach) */
    2022
    2123static void
  • trunk/LocationDo/action.py

    r198 r205  
    6060
    6161def terminalDo(command):
     62    # XXX if this launches Terminal, it inherits our PYTHONPATH
    6263    terminalApp = app(id='com.apple.Terminal')
     64    # XXX this does not create a new Terminal window; fix
    6365    terminalApp.do_script(command + '; exit')
    6466
Note: See TracChangeset for help on using the changeset viewer.