Parcourir la source

[iOS] Document invite module methods

master
Saúl Ibarra Corretgé il y a 7 ans
Parent
révision
cf6dd98b02
2 fichiers modifiés avec 32 ajouts et 5 suppressions
  1. 5
    2
      ios/sdk/src/invite/AddPeopleControllerDelegate.h
  2. 27
    3
      ios/sdk/src/invite/Invite.m

+ 5
- 2
ios/sdk/src/invite/AddPeopleControllerDelegate.h Voir le fichier

@@ -23,14 +23,17 @@
23 23
 @protocol AddPeopleControllerDelegate
24 24
 
25 25
 /**
26
- * Called when an AddPeopleController has results for a query that was previously provided.
26
+ * Called when an AddPeopleController has results for a query that was
27
+ * previously provided.
27 28
  */
28 29
 - (void)addPeopleController:(AddPeopleController * _Nonnull)controller
29 30
           didReceiveResults:(NSArray<NSDictionary*> * _Nonnull)results
30 31
                    forQuery:(NSString * _Nonnull)query;
31 32
 
32 33
 /**
33
- * TODO.
34
+ * Called when an AddPeopleController has finished the inviting process, either
35
+ * succesfully or not. In case of failure the failedInvitees array will contain
36
+ * the items for which invitations failed.
34 37
  */
35 38
 - (void)inviteSettled:(NSArray<NSDictionary *> * _Nonnull)failedInvitees
36 39
  fromSearchController:(AddPeopleController * _Nonnull)addPeopleController;

+ 27
- 3
ios/sdk/src/invite/Invite.m Voir le fichier

@@ -41,10 +41,12 @@ RCT_EXPORT_MODULE();
41 41
 }
42 42
 
43 43
 /**
44
- * Calls the corresponding JitsiMeetView's delegate to request that the native
45
- * invite search be presented.
44
+ * Initiates the process to add people. This involves calling a delegate method
45
+ * in the InviteControllerDelegate so the native host application can start
46
+ * the query process.
46 47
  *
47
- * @param scope
48
+ * @param externalAPIScope - Scope identifying the JitsiMeetView where the
49
+ * calling JS code is being executed.
48 50
  */
49 51
 RCT_EXPORT_METHOD(beginAddPeople:(NSString *)externalAPIScope) {
50 52
     JitsiMeetView *view = [JitsiMeetView viewForExternalAPIScope:externalAPIScope];
@@ -52,6 +54,16 @@ RCT_EXPORT_METHOD(beginAddPeople:(NSString *)externalAPIScope) {
52 54
     [controller beginAddPeople];
53 55
 }
54 56
 
57
+/**
58
+ * Indicates the the invite process has settled / finished.
59
+ *
60
+ * @param externalAPIScope - Scope identifying the JitsiMeetView where the
61
+ * calling JS code is being executed.
62
+ * @param addPeopleControllerScope - Scope identifying the AddPeopleController
63
+ * wich was settled.
64
+ * @param failedInvitees - Array with the invitees which were not invited due
65
+ * to a failure.
66
+ */
55 67
 RCT_EXPORT_METHOD(inviteSettled:(NSString *)externalAPIScope
56 68
        addPeopleControllerScope:(NSString *)addPeopleControllerScope
57 69
                  failedInvitees:(NSArray *)failedInvitees) {
@@ -60,6 +72,18 @@ RCT_EXPORT_METHOD(inviteSettled:(NSString *)externalAPIScope
60 72
     [controller inviteSettled:addPeopleControllerScope failedInvitees:failedInvitees];
61 73
 }
62 74
 
75
+/**
76
+ * Process results received for the given query. This involves calling a
77
+ * delegate method in AddPeopleControllerDelegate so the native host application
78
+ * is made aware of the query results.
79
+ *
80
+ * @param externalAPIScope - Scope identifying the JitsiMeetView where the
81
+ * calling JS code is being executed.
82
+ * @param addPeopleControllerScope - Scope identifying the AddPeopleController
83
+ * for which the results were received.
84
+ * @param query - The actual query for which the results were received.
85
+ * @param results - The query results.
86
+ */
63 87
 RCT_EXPORT_METHOD(receivedResults:(NSString *)externalAPIScope
64 88
          addPeopleControllerScope:(NSString *)addPeopleControllerScope
65 89
                             query:(NSString *)query

Chargement…
Annuler
Enregistrer