+@interface SBAlertItemsController : NSObject {
+}
++ (SBAlertItemsController *) sharedInstance;
+- (void) activateAlertItem:(SBAlertItem *)item;
+@end
+
+@interface SBStatusBarTimeView : UIView {
+}
+- (id) textFont;
+@end
+
+@interface UIApplication (CydiaSubstrate)
+- (void) applicationOpenURL:(id)url;
+@end
+
+@interface UIAlertView (CydiaSubstrate)
+- (void) setForceHorizontalButtonsLayout:(BOOL)force;
+- (void) setBodyText:(NSString *)body;
+- (void) setNumberOfRows:(NSInteger)rows;
+@end
+
+void SafeModeAlertItem$alertSheet$buttonClicked$(id self, SEL sel, id sheet, int button) {
+ switch (button) {
+ case 1:
+ break;
+
+ case 2:
+ exit(0);
+ break;
+
+ case 3:
+ [[UIApplication sharedApplication] applicationOpenURL:[NSURL URLWithString:@"http://cydia.saurik.com/safemode/"]];
+ break;
+ }
+
+ [self dismiss];
+}
+
+void SafeModeAlertItem$configure$requirePasscodeForActions$(id self, SEL sel, BOOL configure, BOOL require) {
+ UIAlertView *sheet([self alertSheet]);
+ [sheet setDelegate:self];
+ [sheet setBodyText:@"We apologize for the inconvenience, but SpringBoard has just crashed.\n\nMobileSubstrate /did not/ cause this problem: it has protected you from it.\n\nYour device is now running in Safe Mode. All extensions that support this safety system are disabled.\n\nReboot (or restart SpringBoard) to return to the normal mode. To return to this dialog touch the status bar."];
+ [sheet addButtonWithTitle:@"OK"];
+ [sheet addButtonWithTitle:@"Restart"];
+ [sheet addButtonWithTitle:@"Help"];
+ [sheet setNumberOfRows:1];
+ if ([sheet respondsToSelector:@selector(setForceHorizontalButtonsLayout:)])
+ [sheet setForceHorizontalButtonsLayout:YES];
+}
+
+void SafeModeAlertItem$performUnlockAction(id self, SEL sel) {
+ [[$SBAlertItemsController sharedInstance] activateAlertItem:self];
+}