You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
3.9 KiB

//
// JCAccount.h
// JCSDKOC
//
// Created by Ginger on 2018/6/8.
// Copyright © 2018年 juphoon. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JCAccountCallback.h"
#import "JCAccountItem.h"
/**
* @defgroup
* @{
*
*/
/**
*
*/
@interface JCAccount : NSObject
/**
* JCAccount
*
* JCAccount 线
*
* @param callback JCAccountCallback
* @return JCAccount
* @exception "JCCallCallback 传空会出现调用失败"
*/
+ (JCAccount* __nullable)create:(id<JCAccountCallback> __nonnull)callback;
/**
* JCAccount
*
* JCAccount 使 JCAccount <br>
* **** JCSDK JCAccount <br>
* JCAccount @ref destroy
*/
+ (void)destroy;
/**
*
*
* @param userIdArray
* @return
* - >0id {@link JCAccountCallback#onQueryUserStatusResult:result:accountItemList: onQueryUserStatusResult}
* - -1
*/
- (int)queryUserStatus:(NSArray<NSString*>* __nonnull)userIdArray;
/**
* uid
*
* @param userIdArray
* @return
* - >0id {@link JCAccountCallback#onQueryServerUidResult:result:serverUids: onQueryServerUidResult}
* - -1
*/
- (int)queryServerUid:(NSArray<NSString*>* __nonnull)userIdArray;
/**
* userId
*
* @param serverUidArray
* @return
* - >0id {@link JCAccountCallback#onQueryUserIdResult:result:userIds: onQueryUserIdResult}
* - -1
*/
- (int)queryUserId:(NSArray<NSString*>* __nonnull)serverUidArray;
/**
*
*
* @param lastQueryTime
* @return
* - >0id {@link JCAccountCallback#onRefreshContacts:result:contacts:updateTime:fullUpdate: onRefreshContacts}
* - -1
*/
- (int)refreshContacts:(long)lastQueryTime;
/**
*
*
* @param contact
* @return
* - >0id {@link JCAccountCallback#onDealContact:result:reason: onDealContact}
* - -1 JCAccountContact
*/
- (int)dealContact:(JCAccountContact* __nonnull)contact;
/**
*
*
* @param serverUid uid
* @param dnd
* - true
* - false
* @return
* - >0id {@link JCAccountCallback#onSetContactDnd:result:reason: onSetContactDnd}
* - -1
*/
- (int)setDnd:(NSString* __nonnull)serverUid dnd:(bool)dnd;
/// @cond Doxygen_All
/**
*
*
* @param customStatus , @ref JCAccountCustomStatusType "自定义状态"
* @param value
* @return
*/
- (bool)setCustomStatus:(JCAccountCustomStatusType)customStatus value:(NSString *_Nonnull)value;
/// @endcond
/**
*
*
* @param callback JCAccountCallback
*/
- (void)addCallback:(id<JCAccountCallback> __nonnull)callback;
/**
*
*
* @param callback JCAccountCallback
*/
- (void)removeCallback:(id<JCAccountCallback> __nonnull)callback;
@end
/**
* @}
*/