iOS Module SDK  0.97
Tools for building CampusLife modules
Public Member Functions
<D2LModuleAssistant> Protocol Reference

#import <D2LModuleAssistant.h>

Public Member Functions

(NSString *) - title
(void) - setRootViewController:
(BOOL) - hasOption:
(NSString *) - stringForOption:
(NSNumber *) - numberForOption:
(BOOL) - boolForOption:
(NSURL *) - urlForOption:
(NSURL *) - localFileURLForOption:
(void) - setBadgeNumber:
(void) - dismiss
(NSString *) - applicationSupportPath
(NSString *) - cachesPath
(NSString *) - documentsPath
(NSString *) - tmpPath

Detailed Description

On initialization, your module receives an assistant object implementing this protocol. This object provides services specific to an instance of your module. (Your module may have multiple instances within the application; each receives its own assistant.)


Member Function Documentation

- (NSString *) applicationSupportPath

Retrieves a path to a subdirectory of the application's Library/Application Support folder specific to this module instance.

Returns:
The path to this module's Application Support folder.
- (BOOL) boolForOption: (NSString *)  option

Retrieves the value of a module configuration option as a boolean.

Parameters:
option- The name of the parameter to retrieve.
Returns:
The value of the parameter as a boolean, or NO if the option value is missing or invalid.
- (NSString *) cachesPath

Retrieves a path to a subdirectory of the application's Library/Caches folder specific to this module instance.

Returns:
The path to this module's Caches folder.
- (void) dismiss

Closes the module and returns the user to the application's main menu. (Your module must provide a way for the user to return to the main menu.)

- (NSString *) documentsPath

Retrieves a path to a subdirectory of the application's Documents folder specific to this module instance.

Returns:
The path to this module's Documents folder.
- (BOOL) hasOption: (NSString *)  option

Checks if an option was provided to the module.

Parameters:
option- The name of the parameter to check.
Returns:
YES if the option exists; NO otherwise.
- (NSURL *) localFileURLForOption: (NSString *)  option

Retrieves the local file URL for a file asset that was uploaded in AppBuilder for use by the module.

Parameters:
option- The name of the parameter to retrieve.
Returns:
The URL of the file provided for the parameter.
- (NSNumber *) numberForOption: (NSString *)  option

Retrieves the value of a module configuration option as a number.

Parameters:
option- The name of the parameter to retrieve.
Returns:
The value of the parameter as a number.
- (void) setBadgeNumber: (NSInteger)  number

Sets the badge number that is displayed on your module's button on the application main menu.

Parameters:
number- The number to display. The badge will not be visible if the number is 0 or negative.
- (void) setRootViewController: (UIViewController *)  viewController

Sets this module's root view controller.

The module's root view controller is released when the module is closed.

Parameters:
viewController- The module's new root view controller.
- (NSString *) stringForOption: (NSString *)  option

Retrieves the value of a module configuration option as a string.

Parameters:
option- The name of the parameter to retrieve.
Returns:
The value of the parameter as a string.
- (NSString *) title

Retrieves the title of the module instance (that is, the text of the button on the app main menu that launched it).

Returns:
The title of the module.
- (NSString *) tmpPath

Retrieves a path to a subdirectory of the application's tmp folder specific to this module instance.

Returns:
The path to this module's tmp folder.
- (NSURL *) urlForOption: (NSString *)  option

Retrieves the value of a module configuration option as a URL.

Parameters:
option- The name of the parameter to retrieve.
Returns:
The value of the parameter as a URL.

The documentation for this protocol was generated from the following file:
 All Data Structures Functions