HBLOHandlerDelegate.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. @protocol HBLOHandlerDelegate <NSObject>
  2. /**
  3. * Name of the handler, shown in Settings.
  4. */
  5. @property (nonatomic, retain) NSString *name;
  6. /**
  7. * Identifier of the handler, used internally by libopener.
  8. *
  9. * To prevent conflicts, use a reverse DNS name, such as your package's identifier. If your handler
  10. * previously supported libopener versions prior to 2.0, use the name you passed to
  11. * -[HBLibOpener registerHandlerWithName:block:].
  12. */
  13. @property (nonatomic, retain) NSString *identifier;
  14. /**
  15. * Custom Preferences list controller bundle.
  16. *
  17. * If nil, a switch will be shown in Settings, and enabled state is handled by libopener. Otherwise,
  18. * tapping the cell will push your list controller, and enabled state is handled by your code.
  19. *
  20. * @see preferencesClass
  21. */
  22. @property (nonatomic, retain) NSBundle *preferencesBundle;
  23. /**
  24. * Custom Preferences list controller class.
  25. *
  26. * Refer to preferencesBundle for more details. If this is nil, the principal class of the bundle
  27. * will be used.
  28. *
  29. * @see preferencesBundle
  30. */
  31. @property (nonatomic, retain) NSString *preferencesClass;
  32. /**
  33. * Called when a URL is opened in order to check if your handler wants to override the URL.
  34. *
  35. * @param url The original URL that the user wants to open.
  36. * @param sender The bundle identifier of the app that invoked the URL open request. Not reliable
  37. * on iOS 5.
  38. * @returns An NSURL that will be opened instead of the original, an NSArray of NSURLs for multiple
  39. * apps, or nil to not change the URL.
  40. */
  41. - (id)openURL:(NSURL *)url sender:(NSString *)sender;
  42. @end