Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[iOS] Document invite module methods

Saúl Ibarra Corretgécf6dd98b02b4
diff --git a/ios/sdk/src/invite/AddPeopleControllerDelegate.h b/ios/sdk/src/invite/AddPeopleControllerDelegate.h
index 684c82f8a2..1854965d53 100644
--- a/ios/sdk/src/invite/AddPeopleControllerDelegate.h
+++ b/ios/sdk/src/invite/AddPeopleControllerDelegate.h
@@ -23,14 +23,17 @@
@protocol AddPeopleControllerDelegate
/**
- * Called when an AddPeopleController has results for a query that was previously provided.
+ * Called when an AddPeopleController has results for a query that was
+ * previously provided.
*/
- (void)addPeopleController:(AddPeopleController * _Nonnull)controller
didReceiveResults:(NSArray<NSDictionary*> * _Nonnull)results
forQuery:(NSString * _Nonnull)query;
/**
- * TODO.
+ * Called when an AddPeopleController has finished the inviting process, either
+ * succesfully or not. In case of failure the failedInvitees array will contain
+ * the items for which invitations failed.
*/
- (void)inviteSettled:(NSArray<NSDictionary *> * _Nonnull)failedInvitees
fromSearchController:(AddPeopleController * _Nonnull)addPeopleController;
diff --git a/ios/sdk/src/invite/Invite.m b/ios/sdk/src/invite/Invite.m
index 510d5c086a..10f73633ed 100644
--- a/ios/sdk/src/invite/Invite.m
+++ b/ios/sdk/src/invite/Invite.m
@@ -41,10 +41,12 @@ RCT_EXPORT_MODULE();
}
/**
- * Calls the corresponding JitsiMeetView's delegate to request that the native
- * invite search be presented.
+ * Initiates the process to add people. This involves calling a delegate method
+ * in the InviteControllerDelegate so the native host application can start
+ * the query process.
*
- * @param scope
+ * @param externalAPIScope - Scope identifying the JitsiMeetView where the
+ * calling JS code is being executed.
*/
RCT_EXPORT_METHOD(beginAddPeople:(NSString *)externalAPIScope) {
JitsiMeetView *view = [JitsiMeetView viewForExternalAPIScope:externalAPIScope];
@@ -52,6 +54,16 @@ RCT_EXPORT_METHOD(beginAddPeople:(NSString *)externalAPIScope) {
[controller beginAddPeople];
}
+/**
+ * Indicates the the invite process has settled / finished.
+ *
+ * @param externalAPIScope - Scope identifying the JitsiMeetView where the
+ * calling JS code is being executed.
+ * @param addPeopleControllerScope - Scope identifying the AddPeopleController
+ * wich was settled.
+ * @param failedInvitees - Array with the invitees which were not invited due
+ * to a failure.
+ */
RCT_EXPORT_METHOD(inviteSettled:(NSString *)externalAPIScope
addPeopleControllerScope:(NSString *)addPeopleControllerScope
failedInvitees:(NSArray *)failedInvitees) {
@@ -60,6 +72,18 @@ RCT_EXPORT_METHOD(inviteSettled:(NSString *)externalAPIScope
[controller inviteSettled:addPeopleControllerScope failedInvitees:failedInvitees];
}
+/**
+ * Process results received for the given query. This involves calling a
+ * delegate method in AddPeopleControllerDelegate so the native host application
+ * is made aware of the query results.
+ *
+ * @param externalAPIScope - Scope identifying the JitsiMeetView where the
+ * calling JS code is being executed.
+ * @param addPeopleControllerScope - Scope identifying the AddPeopleController
+ * for which the results were received.
+ * @param query - The actual query for which the results were received.
+ * @param results - The query results.
+ */
RCT_EXPORT_METHOD(receivedResults:(NSString *)externalAPIScope
addPeopleControllerScope:(NSString *)addPeopleControllerScope
query:(NSString *)query