2017-01-24 01:47:14 -05:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2017-01-24 01:47:14 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2017-01-24 01:47:14 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCP\Contacts\ContactsMenu;
|
|
|
|
|
|
|
|
|
|
use JsonSerializable;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 12.0
|
|
|
|
|
*/
|
|
|
|
|
interface IEntry extends JsonSerializable {
|
|
|
|
|
/**
|
|
|
|
|
* @since 12.0
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
2021-03-04 08:30:21 -05:00
|
|
|
public function getFullName(): string;
|
2017-01-24 01:47:14 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 12.0
|
|
|
|
|
* @return string[]
|
|
|
|
|
*/
|
2021-03-04 08:30:21 -05:00
|
|
|
public function getEMailAddresses(): array;
|
2017-01-24 01:47:14 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 12.0
|
|
|
|
|
* @return string|null image URI
|
|
|
|
|
*/
|
2021-03-04 08:30:21 -05:00
|
|
|
public function getAvatar(): ?string;
|
2017-01-24 01:47:14 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 12.0
|
|
|
|
|
* @param IAction $action an action to show in the contacts menu
|
|
|
|
|
*/
|
2021-03-04 08:30:21 -05:00
|
|
|
public function addAction(IAction $action): void;
|
2017-01-24 01:47:14 -05:00
|
|
|
|
2023-10-10 10:11:25 -04:00
|
|
|
/**
|
|
|
|
|
* Set the (system) contact's user status
|
|
|
|
|
*
|
|
|
|
|
* @since 28.0
|
|
|
|
|
* @param string $status
|
|
|
|
|
* @param string $statusMessage
|
|
|
|
|
* @param string|null $icon
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function setStatus(string $status,
|
2024-03-28 11:13:19 -04:00
|
|
|
?string $statusMessage = null,
|
|
|
|
|
?int $statusMessageTimestamp = null,
|
|
|
|
|
?string $icon = null): void;
|
2023-10-10 10:11:25 -04:00
|
|
|
|
2017-01-24 01:47:14 -05:00
|
|
|
/**
|
|
|
|
|
* Get an arbitrary property from the contact
|
|
|
|
|
*
|
|
|
|
|
* @since 12.0
|
|
|
|
|
* @param string $key
|
|
|
|
|
* @return mixed the value of the property or null
|
|
|
|
|
*/
|
2021-03-04 08:30:21 -05:00
|
|
|
public function getProperty(string $key);
|
2017-01-24 01:47:14 -05:00
|
|
|
}
|