浏览代码

[iOS] Document invite module methods

master
Saúl Ibarra Corretgé 7 年前
父节点
当前提交
cf6dd98b02
共有 2 个文件被更改,包括 32 次插入5 次删除
  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 查看文件

23
 @protocol AddPeopleControllerDelegate
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
 - (void)addPeopleController:(AddPeopleController * _Nonnull)controller
29
 - (void)addPeopleController:(AddPeopleController * _Nonnull)controller
29
           didReceiveResults:(NSArray<NSDictionary*> * _Nonnull)results
30
           didReceiveResults:(NSArray<NSDictionary*> * _Nonnull)results
30
                    forQuery:(NSString * _Nonnull)query;
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
 - (void)inviteSettled:(NSArray<NSDictionary *> * _Nonnull)failedInvitees
38
 - (void)inviteSettled:(NSArray<NSDictionary *> * _Nonnull)failedInvitees
36
  fromSearchController:(AddPeopleController * _Nonnull)addPeopleController;
39
  fromSearchController:(AddPeopleController * _Nonnull)addPeopleController;

+ 27
- 3
ios/sdk/src/invite/Invite.m 查看文件

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
 RCT_EXPORT_METHOD(beginAddPeople:(NSString *)externalAPIScope) {
51
 RCT_EXPORT_METHOD(beginAddPeople:(NSString *)externalAPIScope) {
50
     JitsiMeetView *view = [JitsiMeetView viewForExternalAPIScope:externalAPIScope];
52
     JitsiMeetView *view = [JitsiMeetView viewForExternalAPIScope:externalAPIScope];
52
     [controller beginAddPeople];
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
 RCT_EXPORT_METHOD(inviteSettled:(NSString *)externalAPIScope
67
 RCT_EXPORT_METHOD(inviteSettled:(NSString *)externalAPIScope
56
        addPeopleControllerScope:(NSString *)addPeopleControllerScope
68
        addPeopleControllerScope:(NSString *)addPeopleControllerScope
57
                  failedInvitees:(NSArray *)failedInvitees) {
69
                  failedInvitees:(NSArray *)failedInvitees) {
60
     [controller inviteSettled:addPeopleControllerScope failedInvitees:failedInvitees];
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
 RCT_EXPORT_METHOD(receivedResults:(NSString *)externalAPIScope
87
 RCT_EXPORT_METHOD(receivedResults:(NSString *)externalAPIScope
64
          addPeopleControllerScope:(NSString *)addPeopleControllerScope
88
          addPeopleControllerScope:(NSString *)addPeopleControllerScope
65
                             query:(NSString *)query
89
                             query:(NSString *)query

正在加载...
取消
保存