Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gui2.0 #466

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ec6b88e
Get rid of DEBUG_MODE define (already have DEBUG define)
djbe Sep 17, 2011
133bdae
Modernize project
djbe Sep 18, 2011
0d4ab13
Small simplification of helpertool
djbe Sep 18, 2011
1ac109b
WIP: basic source structure in place.
djbe Sep 22, 2011
52a3f5a
Got rid of DSLogger and replaced it with a handier DLog macro (togeth…
djbe Sep 22, 2011
3624e0f
Fix ambiguous method (initWithObjects:count:) compilation errors unde…
atnan Sep 22, 2011
6d3938e
Merge pull request #50 from atnan/fixclang2errors
johnezang Sep 22, 2011
09e2fe4
Converted CoreWLAN evidence to source
djbe Sep 22, 2011
fd68f20
Moved external source files to their own directory
djbe Sep 22, 2011
9237081
Use KVOAdditions from Devin Lane (shiftedbits.org)
djbe Sep 22, 2011
678de5a
Merge branch 'master' of git://github.com/johnezang/JSONKit into dev_…
djbe Sep 22, 2011
469cc7d
Automatically start/stop source on rule (de)registration, and some ot…
djbe Sep 23, 2011
b00526a
Converted RunningApps evidence to source
djbe Sep 23, 2011
4f820e2
woops
djbe Sep 23, 2011
948bbb7
Improved how rules are registered a bit
djbe Sep 23, 2011
5e5a7c0
Added rule factory (ruleManager)
djbe Sep 24, 2011
6c06cd3
Remove converted evidencesources (audioOutput, power, runningapps)
djbe Sep 24, 2011
75fc6a8
Convert bonjour evidence to rule (and get rid of it)
djbe Sep 24, 2011
25815d0
Converted WLAN evidence to rules (ssid and bssid)
djbe Sep 24, 2011
a6a0c0e
Small cleanup
dustinrue Sep 26, 2011
290094f
Getting ready for context groups
dustinrue Sep 26, 2011
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
302 changes: 227 additions & 75 deletions ControlPlane.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -805,13 +805,13 @@ - (void)replaceObjectAtIndex:(NSUInteger)objectIndex withObject:(id)anObject
- (id)copyWithZone:(NSZone *)zone
{
NSParameterAssert((objects != NULL) && (count <= capacity));
return((mutations == 0UL) ? [self retain] : [[NSArray allocWithZone:zone] initWithObjects:objects count:count]);
return((mutations == 0UL) ? [self retain] : [(NSArray *)[NSArray allocWithZone:zone] initWithObjects:objects count:count]);
}

- (id)mutableCopyWithZone:(NSZone *)zone
{
NSParameterAssert((objects != NULL) && (count <= capacity));
return([[NSMutableArray allocWithZone:zone] initWithObjects:objects count:count]);
return([(NSMutableArray *)[NSMutableArray allocWithZone:zone] initWithObjects:objects count:count]);
}

@end
Expand Down
File renamed without changes.
108 changes: 108 additions & 0 deletions External Source/KVOAdditions/KVOAdditions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* KVOAdditions.h
* "THE BEER-WARE LICENSE" (Revision 42):
* <devin at shiftedbits dot org> (Devin Lane) wrote this file.
* As long as you retain this notice you can do whatever you want with this
* stuff. If we meet some day, and you think this stuff is worth it, you can
* buy me a beer in return.
*
* Version 1.2.1:
* - Now runs on iPhone OS 2.0
*
* Version 1.2:
* - Added automatic -KVODealloc invocation
* - The selector is now considered in the uniqueness of an observation
* - New removeObserver:forKeyPath:selector: method
*
* Version 1.1: Two critical bug fixes.
* - Multiple observers for the same key path are now handled correctly.
* - Subclasses that override removeObserver:forKeyPath: are no longer
* swizzled incorrectly.
* Version 1.0: Initial release
*/

#import <Foundation/Foundation.h>

@interface NSObject (KVOAdditions)

/* Register `observer' for changes of the value at `keyPath` relative to the
* receiver. `selector' is invoked on `observer' when the value is modified
* according to the specified options. A single observer can observe a single
* keyPath with multiple selectors. This allows a class and a subclass to
* observe the same key path on an object. Due to this, it is recommended
* that externally available classes that use this observation mechanism
* use _<class>_ as a prefix to their observation selectors to avoid naming
* conflicts.
*
* `selector' should have one of the following signatures:
*
* 1. - (void)valueDidChange;
* Receive nothing about the observed change.
*
* 2. - (void)valueDidChange:(NSDictionary *)change;
* Receive the raw change dictionary.
*
* In addition, if NSKeyValueObservingOptionOld or NSKeyValueObservingOptionNew
* is included in options, the following can be used:
*
* 3. - (void)valueDidChange:(id)oldValue newValue:(id)newValue
* Receive the old and new values, both of which can be nil.
*
* 4. - (void)valueDidChange:(id)oldValue newValue:(id)newValue isPrior:(BOOL)prior
* Receive the old and new values, both of which can be nil. `prior' is true
* if this is a prior notification (if NSKeyValueChangeNotificationIsPriorKey is
* included in the change dictionary.)
*/

- (void)addObserver:(NSObject *)observer
forKeyPath:(NSString *)keyPath
options:(NSKeyValueObservingOptions)options
selector:(SEL)selector;

/* Deregister `observer' of the value at `keyPath', relative to the receiver,
* for which notifications are sent to `selector'. Pass NULL for `selector'
* to remove notifications for all registered selectors. */

- (void)removeObserver:(NSObject *)observer
forKeyPath:(NSString *)keyPath
selector:(SEL)selector;

/* Return YES if observations on the receiver by the receiver
* should be automatically removed when the receiver is deallocated
* or finalized. Defaults to YES. */

+ (BOOL)automaticallyRemoveSelfObservations;

/* Sent right before an object will deallocate. When received, the receiver
* should deregister itself as an observer for any properties it is observing
* on itself. This message is not sent under GC. */

- (void)KVODealloc;

@end

@interface NSArray (KVOAdditions)

/* Adds observer `observer' for keyPath `keyPath' with options `options' to
* the objects at indices `indexes' in the receiving array. This is the
* equivalent of adding the observer using the method above for each of the
* objects in `indexes'. Using this method, unlike
* addObserver:toObjectsAtIndexes:forKeyPath:options:context: is not faster
* than individually observing the desired objects. */

- (void)addObserver:(NSObject *)observer
toObjectsAtIndexes:(NSIndexSet *)indexes
forKeyPath:(NSString *)keyPath
options:(NSKeyValueObservingOptions)options
selector:(SEL)selector;

/* Deregister `observer' of the value at `keyPath', relative to the objects
* in the receiver at `indexes', for which notifications are sent to
* `selector'. Pass NULL for `selector' to remove notifications for all
* registered selectors. */

- (void)removeObserver:(NSObject *)observer
fromObjectsAtIndexes:(NSIndexSet *)indexes
forKeyPath:(NSString *)keyPath
selector:(SEL)selector;
@end