WiFi On/Off 등 SpringBoard 에서의 설정이나 기타 이벤트들을 정리할 예정인 페이지.
Ring/Silent 토글과 같이 정말 알려주기 배아픈 것들은 조금만 생각해보고...;;ㅋㅋ(사실 아이폰 외에 다른데서 잘 작동할 지도 미지수..)
//========================================//
[Change Log]
2011 Dec. 1 글 작성, WiFi, Bluetooth, Rotation Lock, AirplaneMode, Brightness, SSH 추가
2012 Dec. 19 추가한줄 알았던 Ring/Silent 수정(ㅋ), 밝기 iOS6 지원 수정
ps. 헐.. 1년이나 지났다니.....
Class: SBWiFiManager
Method:
+(id)sharedInstance;
- (BOOL)wiFiEnabled;
- (void)setWiFiEnabled:(BOOL)fp8;
2. Bluetooth
Class: BluetoothManager
Method:
+(id)sharedInstance;
- (BOOL)enabled;
- (void)setEnabled:(BOOL)fp8;
- (void)setPowered:(BOOL)fp8;
ex)
{
~~~~
[btMgr setEnabled:YES];
[btMgr setPowered:YES];
}
3. Rotation Lock
Class: SBOrientationLockManager
Method:
+(id)sharedInstance;
- (BOOL)isLocked;
- (void)lock;
- (void)unlock;
HUDView
Class: SBRotationLockHUDController
Method:
+(void)activateWithLocked
:(int)fp8; //0: unlock / 1: lock
Image (Need without iPad)
RotationHUDImage.zip
4. Ring/Silent
Class: SBMediaController
+(id)sharedInstance;
-(BOOL)isRingerMuted // 0: ring 1: muted
-(void)setRingerMuted:(BOOL)fp8;
5. Airplane Mode (tested on 3Gs / iOS5.0)
Class: SBTelephonyManager
Method:
+(id)sharedTelephonyManager;
- (BOOL)isInAirplaneMode;
- (void)setIsInAirplaneMode:(BOOL)fp8;
6. Brightness
//iOS5,6 지원. iOS4는 잘 모르겠지만 되는것으로 추정;;ㅋ
Class: UIScreen
[[UIScreen mainScreen] brightness]
Class: SBBrightnessController
Method:
+(id)sharedBrightnessController;
-(void)_setBrightnessLevel:(float)fp8 showHUD:(BOOL)fp16;
//iOS6부터 안됨
Class: SpringBoard (UIApplication)
Method:
+(id)sharedApplication;
- (float)currentBacklightLevel;
- (void)setBacklightLevel:(float)fp8;
- (void)setBacklightLevel:(float)fp8 permanently:(BOOL)fp16;
7. SSH (maybe stupid way..)
On:
system("launchctl load -w /Library/LaunchDaemons/com.openssh.sshd.plist");
Off:
system("launchctl unload -w /Library/LaunchDaemons/com.openssh.sshd.plist");