mirror of
https://github.com/thewesker/osx-patcher.git
synced 2025-12-22 13:21:12 -05:00
Initial commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// GlobalConstants.h
|
||||
// nosleep
|
||||
//
|
||||
// Created by Pavel Prokofiev on 4/8/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#define _STR(x) #x
|
||||
#define STR(x) _STR(x)
|
||||
|
||||
// Extension part
|
||||
#define NoSleepExtension com_protech_nosleepextension
|
||||
#define NoSleepClientClass com_protech_nosleepclientclass
|
||||
#define kNoSleepCommandDisabled iokit_vendor_specific_msg(0)
|
||||
#define kNoSleepCommandEnabled iokit_vendor_specific_msg(1)
|
||||
#define kNoSleepCommandLockScreenRequest iokit_vendor_specific_msg(2)
|
||||
// AppleNVRAM Variable name
|
||||
#define IORegistrySleepSuppressionMode "IORegistryCurrentSleepMode"
|
||||
|
||||
// Interface
|
||||
#define kNoSleepDriverClassName STR(NoSleepExtension)
|
||||
|
||||
// GUI
|
||||
#define SHOW_UI_ALERT_KEXT_NOT_LOADED() NSRunAlertPanel(@"Oops!", @"NoSleep Kernel Extension is not loaded.", @"OK", nil, nil)
|
||||
|
||||
#define NOSLEEP_ID "com.protech.NoSleep"
|
||||
|
||||
#define NOSLEEP_HELPER_PATH "/Applications/Utilities/NoSleep.app"
|
||||
#define NOSLEEP_PREFPANE_PATH "/Library/PreferencePanes/NoSleep.prefPane"
|
||||
|
||||
#define kNoSleepModeCurrent 0
|
||||
#define kNoSleepModeAC 1
|
||||
#define kNoSleepModeBattery 2
|
||||
|
||||
//Settings
|
||||
#define NOSLEEP_SETTINGS_UPDATE_EVENTNAME "UpdateSettings"
|
||||
|
||||
#define NOSLEEP_SETTINGS_isBWIconEnabledID "IsBWIconEnabled"
|
||||
#define NOSLEEP_SETTINGS_toLockScreenID "LockScreen"
|
||||
#define NOSLEEP_SETTINGS_useDoubleClick "UseDoubleClick"
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// NoSleepInterface.h
|
||||
// nosleep
|
||||
//
|
||||
// Created by Pavel Prokofiev on 4/3/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#include <IOKit/IOKitLib.h>
|
||||
|
||||
//io_connect_t m_connect;
|
||||
typedef io_service_t NoSleepInterfaceService;
|
||||
typedef io_connect_t NoSleepInterfaceConnect;
|
||||
typedef io_object_t NoSleepInterestNotification;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern bool NoSleepVerbose;
|
||||
|
||||
NoSleepInterestNotification NoSleep_ReceiveStateChanged(NoSleepInterfaceConnect m_connect, IOServiceInterestCallback callback, void *refCon);
|
||||
void NoSleep_ReleaseStateChanged(NoSleepInterestNotification notifyObj);
|
||||
|
||||
bool NoSleep_InterfaceCreate(NoSleepInterfaceService *service, NoSleepInterfaceConnect *connect);
|
||||
bool NoSleep_InterfaceDestroy(NoSleepInterfaceConnect connect);
|
||||
bool NoSleep_GetSleepSuppressionMode(NoSleepInterfaceConnect connect, int mode);
|
||||
bool NoSleep_SetSleepSuppressionMode(NoSleepInterfaceConnect connect, bool state, int mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// NoSleepInterfaceWrapper.h
|
||||
// nosleep
|
||||
//
|
||||
// Created by Pavel Prokofiev on 4/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <NoSleep/NoSleepInterface.h>
|
||||
#import <NoSleep/NoSleepNotificationDelegate.h>
|
||||
|
||||
@interface NoSleepInterfaceWrapper : NSObject {
|
||||
@private
|
||||
NoSleepInterfaceConnect _noSleepInterface;
|
||||
NoSleepInterestNotification _noSleepNotification;
|
||||
|
||||
id<NoSleepNotificationDelegate> notificationDelegate;
|
||||
}
|
||||
|
||||
@property (retain) id<NoSleepNotificationDelegate> notificationDelegate;
|
||||
|
||||
-(BOOL) stateForMode:(int)mode;
|
||||
-(void) setState:(BOOL)state forMode:(int)mode;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// NoSleepNotificationDelegate.h
|
||||
// nosleep
|
||||
//
|
||||
// Created by Pavel Prokofiev on 4/8/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol NoSleepNotificationDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
-(void) notificationReceived:(uint32_t)messageType :(void *)messageArgument;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Utilities.h
|
||||
// NoSleepFramework
|
||||
//
|
||||
// Created by Pavel Prokofiev on 2/24/12.
|
||||
// Copyright 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef NoSleepFramework_Utilities_h
|
||||
#define NoSleepFramework_Utilities_h
|
||||
|
||||
typedef enum {
|
||||
kLICheck = 0,
|
||||
kLIRegister,
|
||||
kLIUnregister,
|
||||
} LoginItemAction;
|
||||
|
||||
BOOL registerLoginItem(LoginItemAction action);
|
||||
|
||||
BOOL GetLockScreen();
|
||||
void SetLockScreen(BOOL value);
|
||||
|
||||
#endif
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>14A389</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>NoSleep</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.protech.NoSleepFramework</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>NoSleep</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.4.0</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>6A1052d</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>14A382</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.10</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0610</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>6A1052d</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012-2014 Pavel Prokofiev. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Resources/Info.plist</key>
|
||||
<data>
|
||||
k/J3tXXwoqzsv95n/CRAEXo67m4=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Headers/GlobalConstants.h</key>
|
||||
<data>
|
||||
sDffwldKnoEu/EHWkCHFsPKEeG4=
|
||||
</data>
|
||||
<key>Headers/NoSleepInterface.h</key>
|
||||
<data>
|
||||
7HJqbbsO0w8W3PQfAty1ebM+vLc=
|
||||
</data>
|
||||
<key>Headers/NoSleepInterfaceWrapper.h</key>
|
||||
<data>
|
||||
6daZzzxCgIG2RrYVgNCqrw+5nTI=
|
||||
</data>
|
||||
<key>Headers/NoSleepNotificationDelegate.h</key>
|
||||
<data>
|
||||
mhCq+U/28Fe/eNS0FkNZotuvgPI=
|
||||
</data>
|
||||
<key>Headers/Utilities.h</key>
|
||||
<data>
|
||||
C3gjUIo0ubMsM/vUpatD9psSJJw=
|
||||
</data>
|
||||
<key>Resources/Info.plist</key>
|
||||
<data>
|
||||
k/J3tXXwoqzsv95n/CRAEXo67m4=
|
||||
</data>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^Resources/</key>
|
||||
<true/>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^[^/]+$</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1 @@
|
||||
A
|
||||
Reference in New Issue
Block a user