summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLManager.h
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-07-08 11:33:57 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-07-08 11:33:57 -0400
commit6f064b8b22417e604e958ee27f79a21de1c99523 (patch)
tree0b04c43061038bf808c45539ac59c8cd1ce74487 /SmartDeviceLink/SDLManager.h
parentd574473c068d5eed098c938aff09308557d79b0c (diff)
downloadsdl_ios-6f064b8b22417e604e958ee27f79a21de1c99523.tar.gz
Shift responsibilities out of SDLManager
* Move exception creation to SDLError class as a new category on NSException * Add documentation to some SDLManager public methods * Rewrite SDLNotificationConstants for more consistency * Add an SDLNotificationDispatcher private class that acts as a proxy listener and dispatches notifications * Add an SDLResponseDispatcher private class that takes care of storing and calling handlers on requests sent through SDLManager
Diffstat (limited to 'SmartDeviceLink/SDLManager.h')
-rw-r--r--SmartDeviceLink/SDLManager.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLManager.h b/SmartDeviceLink/SDLManager.h
index e2f911112..b1eb6a8b1 100644
--- a/SmartDeviceLink/SDLManager.h
+++ b/SmartDeviceLink/SDLManager.h
@@ -47,11 +47,32 @@ extern NSString *const SDLLifecycleStateReady;
*/
- (instancetype)initWithConfiguration:(SDLConfiguration *)configuration delegate:(nullable id<SDLManagerDelegate>)delegate NS_DESIGNATED_INITIALIZER;
+/**
+ * Start the manager, which will tell it to start looking for a connection.
+ */
- (void)start;
+
+/**
+ * Stop the manager, it will disconnect if needed and no longer look for a connection. You probably don't need to call this method ever.
+ */
- (void)stop;
+
#pragma mark Manually Send RPC Requests
+
+/**
+ * Send an RPC request and don't bother with the response or error. If you need the response or error, call sendRequest:withCompletionHandler: instead.
+ *
+ * @param request The RPC request to send
+ */
- (void)sendRequest:(SDLRPCRequest *)request;
+
+/**
+ * Send an RPC request and set a completion handler that will be called with the response when the response returns.
+ *
+ * @param request The RPC request to send
+ * @param handler The handler that will be called when the response returns
+ */
- (void)sendRequest:(SDLRPCRequest *)request withCompletionHandler:(nullable SDLRequestCompletionHandler)handler;
@end