Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumblekit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2011-12-01 16:59:10 +0400
committerMikkel Krautz <mikkel@krautz.dk>2011-12-01 16:59:10 +0400
commit5b023d453c0d706362477353b34ebbb6b67e450b (patch)
treee3d627b602f61e000242c4f696cf67a903e71b4b /src/MumbleKit
parentb455261d2d7bf432f8e1f3b02b77aa9963d4c14f (diff)
Improved MKConnection error delegation.
Diffstat (limited to 'src/MumbleKit')
-rw-r--r--src/MumbleKit/MKConnection.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/MumbleKit/MKConnection.h b/src/MumbleKit/MKConnection.h
index bf36bc4..a5b369d 100644
--- a/src/MumbleKit/MKConnection.h
+++ b/src/MumbleKit/MKConnection.h
@@ -140,12 +140,26 @@ typedef enum {
- (void) connectionOpened:(MKConnection *)conn;
/**
+ * This method is called if a connection cannot be stablished to the given server.
+ *
+ @ @param conn The connection that this occurred in.
+ * @param err Error describing why the connection could not be established.
+ */
+- (void) connection:(MKConnection *)conn unableToConnectWithError:(NSError *)err;
+
+/**
* This method is called whenever the connection is closed, be it by an error, or by
- * disconnection.
+ * disconnection. If the disconnection was caused by an error, the err parameter will
+ * be a non-nil value.
+ *
+ * This method can only be called after the connection has been opened. If an error occurs
+ * during the connection phase, the method `connection:unableToConnectWithError:` will be
+ * called instead.
*
* @param conn The connection that was closed.
+ * @param err The error that caused the disconnection. (Nil if not caused by an error)
*/
-- (void) connectionClosed:(MKConnection *)conn;
+- (void) connection:(MKConnection *)conn closedWithError:(NSError *)err;
/**
* This method is called if the MKConnection could not verify the TLS certificate chain