NCContact.h 912 B

1234567891011121314151617181920212223242526
  1. /**
  2. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: GPL-3.0-or-later
  4. */
  5. #import <Foundation/Foundation.h>
  6. #import <Realm/Realm.h>
  7. @class NCUser;
  8. @interface NCContact : RLMObject
  9. @property (nonatomic, copy) NSString *internalId; // accountId@identifier
  10. @property (nonatomic, copy) NSString *accountId;
  11. @property (nonatomic, copy) NSString *identifier;
  12. @property (nonatomic, copy) NSString *cloudId;
  13. @property (nonatomic, assign) NSInteger lastUpdate;
  14. + (instancetype)contactWithIdentifier:(NSString *)identifier cloudId:(NSString *)cloudId lastUpdate:(NSInteger)lastUpdate andAccountId:(NSString *)accountId;
  15. + (void)updateContact:(NCContact *)managedContact withContact:(NCContact *)contact;
  16. + (NSArray<NCUser *> *)contactsForAccountId:(NSString *)accountId contains:(NSString * _Nullable)searchString;
  17. - (NSString *)userId;
  18. - (NSString *)name;
  19. @end