Skip to content
This repository has been archived by the owner on Jan 19, 2018. It is now read-only.

Commit

Permalink
add/improve BVMOpenLinkManager documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cdzombak committed Mar 29, 2013
1 parent c284655 commit f40b376
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion buyvmmanager/BVMLinkOpenManager.h
Expand Up @@ -9,19 +9,32 @@ typedef NS_ENUM(NSInteger, BVMBrowser) {

@interface BVMLinkOpenManager : NSObject

/**
* Returns YES if the given browser is available on this device.
*/
+ (BOOL)browserAvailable:(BVMBrowser)browser;

/**
* Returns the user's selected default browser.
*/
+ (BVMBrowser)selectedBrowser;

/**
* Sets the user's selected default browser.
*/
+ (void)setSelectedBrowser:(BVMBrowser)browser;

/**
* Open the given URL.
* Opens the given URL.
*
* If HTTP or HTTPS, uses the defaut browser.
*/
+ (void)openURL:(NSURL *)url;
+ (void)openURLString:(NSString *)urlString;

/**
* Returns the human-friendly name for the given browser.
*/
+ (NSString *)nameForBrowser:(BVMBrowser)browser;

@end
1 change: 1 addition & 0 deletions buyvmmanager/BVMLinkOpenManager.m
Expand Up @@ -36,6 +36,7 @@ + (BOOL)browserAvailable:(BVMBrowser)browser
#pragma mark Default browser management

+ (BVMBrowser)selectedBrowser {
// note: if not set, this falls back to 0 == BVMBrowserSafari
return [[NSUserDefaults standardUserDefaults] integerForKey:kBVMBrowserPrefsKey];
}

Expand Down

0 comments on commit f40b376

Please sign in to comment.