NSObject+SPInvocationGrabbing.h 841 B

123456789101112131415161718192021222324252627282930
  1. #import <Foundation/Foundation.h>
  2. @interface SPInvocationGrabber : NSObject {
  3. id _object;
  4. NSInvocation *_invocation;
  5. int frameCount;
  6. char **frameStrings;
  7. BOOL backgroundAfterForward;
  8. BOOL onMainAfterForward;
  9. BOOL waitUntilDone;
  10. }
  11. -(id)initWithObject:(id)obj;
  12. -(id)initWithObject:(id)obj stacktraceSaving:(BOOL)saveStack;
  13. @property (readonly, retain, nonatomic) id object;
  14. @property (readonly, retain, nonatomic) NSInvocation *invocation;
  15. @property BOOL backgroundAfterForward;
  16. @property BOOL onMainAfterForward;
  17. @property BOOL waitUntilDone;
  18. -(void)invoke; // will release object and invocation
  19. -(void)printBacktrace;
  20. -(void)saveBacktrace;
  21. @end
  22. @interface NSObject (SPInvocationGrabbing)
  23. -(id)grab;
  24. -(id)invokeAfter:(NSTimeInterval)delta;
  25. -(id)nextRunloop;
  26. -(id)inBackground;
  27. -(id)onMainAsync:(BOOL)async;
  28. @end