'OCP\\Calendar\\BackendTemporarilyUnavailableException' => $baseDir . '/lib/public/Calendar/BackendTemporarilyUnavailableException.php',
'OCP\\Calendar\\ICalendar' => $baseDir . '/lib/public/Calendar/ICalendar.php',
'OCP\\Calendar\\IManager' => $baseDir . '/lib/public/Calendar/IManager.php',
+ 'OCP\\Calendar\\IMetadataProvider' => $baseDir . '/lib/public/Calendar/IMetadataProvider.php',
'OCP\\Calendar\\Resource\\IBackend' => $baseDir . '/lib/public/Calendar/Resource/IBackend.php',
'OCP\\Calendar\\Resource\\IManager' => $baseDir . '/lib/public/Calendar/Resource/IManager.php',
'OCP\\Calendar\\Resource\\IResource' => $baseDir . '/lib/public/Calendar/Resource/IResource.php',
+ 'OCP\\Calendar\\Resource\\IResourceMetadata' => $baseDir . '/lib/public/Calendar/Resource/IResourceMetadata.php',
'OCP\\Calendar\\Room\\IBackend' => $baseDir . '/lib/public/Calendar/Room/IBackend.php',
'OCP\\Calendar\\Room\\IManager' => $baseDir . '/lib/public/Calendar/Room/IManager.php',
'OCP\\Calendar\\Room\\IRoom' => $baseDir . '/lib/public/Calendar/Room/IRoom.php',
+ 'OCP\\Calendar\\Room\\IRoomMetadata' => $baseDir . '/lib/public/Calendar/Room/IRoomMetadata.php',
'OCP\\Capabilities\\ICapability' => $baseDir . '/lib/public/Capabilities/ICapability.php',
'OCP\\Capabilities\\IPublicCapability' => $baseDir . '/lib/public/Capabilities/IPublicCapability.php',
'OCP\\Collaboration\\AutoComplete\\AutoCompleteEvent' => $baseDir . '/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php',
'OCP\\Calendar\\BackendTemporarilyUnavailableException' => __DIR__ . '/../../..' . '/lib/public/Calendar/BackendTemporarilyUnavailableException.php',
'OCP\\Calendar\\ICalendar' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendar.php',
'OCP\\Calendar\\IManager' => __DIR__ . '/../../..' . '/lib/public/Calendar/IManager.php',
+ 'OCP\\Calendar\\IMetadataProvider' => __DIR__ . '/../../..' . '/lib/public/Calendar/IMetadataProvider.php',
'OCP\\Calendar\\Resource\\IBackend' => __DIR__ . '/../../..' . '/lib/public/Calendar/Resource/IBackend.php',
'OCP\\Calendar\\Resource\\IManager' => __DIR__ . '/../../..' . '/lib/public/Calendar/Resource/IManager.php',
'OCP\\Calendar\\Resource\\IResource' => __DIR__ . '/../../..' . '/lib/public/Calendar/Resource/IResource.php',
+ 'OCP\\Calendar\\Resource\\IResourceMetadata' => __DIR__ . '/../../..' . '/lib/public/Calendar/Resource/IResourceMetadata.php',
'OCP\\Calendar\\Room\\IBackend' => __DIR__ . '/../../..' . '/lib/public/Calendar/Room/IBackend.php',
'OCP\\Calendar\\Room\\IManager' => __DIR__ . '/../../..' . '/lib/public/Calendar/Room/IManager.php',
'OCP\\Calendar\\Room\\IRoom' => __DIR__ . '/../../..' . '/lib/public/Calendar/Room/IRoom.php',
+ 'OCP\\Calendar\\Room\\IRoomMetadata' => __DIR__ . '/../../..' . '/lib/public/Calendar/Room/IRoomMetadata.php',
'OCP\\Capabilities\\ICapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/ICapability.php',
'OCP\\Capabilities\\IPublicCapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/IPublicCapability.php',
'OCP\\Collaboration\\AutoComplete\\AutoCompleteEvent' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php',
--- /dev/null
+<?php
+/**
+ * @copyright 2019, Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @author Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Calendar;
+
+/**
+ * Interface IMetadataProvider
+ *
+ * Provider for metadata of a resource or a room
+ *
+ * @package OCP\Calendar
+ * @since 17.0.0
+ */
+interface IMetadataProvider {
+
+ /**
+ * Get a list of all metadata keys available for this room
+ *
+ * Room backends are allowed to return custom keys, beyond the ones
+ * defined in this class. If they do, they should make sure to use their
+ * own namespace.
+ *
+ * @return String[] - A list of available keys
+ * @since 17.0.0
+ */
+ public function getAllAvailableMetadataKeys():array;
+
+ /**
+ * Get whether or not a metadata key is set for this room
+ *
+ * @param string $key - The key to check for
+ * @return bool - Whether or not key is available
+ * @since 17.0.0
+ */
+ public function hasMetadataForKey(string $key):boolean;
+
+ /**
+ * Get the value for a metadata key
+ *
+ * @param string $key - The key to check for
+ * @return string|null - The value stored for the key, null if no value stored
+ * @since 17.0.0
+ */
+ public function getMetadataForKey(string $key):?string;
+}
--- /dev/null
+<?php
+/**
+ * @copyright 2019, Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @author Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Calendar\Resource;
+
+/**
+ * Interface IResourceMetadata
+ *
+ * This interface provides keys for common metadata.
+ * Resource Backends are not limited to this list and can provide
+ * any metadata they want.
+ *
+ * @package OCP\Calendar\Resource
+ * @since 17.0.0
+ */
+interface IResourceMetadata {
+
+ /**
+ * Type of resource
+ *
+ * Allowed values for this key include:
+ * - projector
+ * - tv
+ * - vehicle
+ * - other
+ *
+ * @since 17.0.0
+ */
+ public const RESOURCE_TYPE = '{http://nextcloud.com/ns}resource-type';
+
+ /**
+ * If resource is of type vehicle, this describes the type of vehicle
+ *
+ * Allowed values:
+ * - bicycle
+ * - scooter
+ * - motorbike
+ * - car
+ * - plane
+ * - helicopter
+ * - other
+ *
+ * @since 17.0.0
+ */
+ public const VEHICLE_TYPE = '{http://nextcloud.com/ns}resource-vehicle-type';
+
+ /**
+ * Make of the vehicle
+ *
+ * @since 17.0.0
+ */
+ public const VEHICLE_MAKE = '{http://nextcloud.com/ns}resource-vehicle-make';
+
+ /**
+ * Model of the vehicle
+ *
+ * @since 17.0.0
+ */
+ public const VEHICLE_MODEL = '{http://nextcloud.com/ns}resource-vehicle-model';
+
+ /**
+ * Whether or not the car is electric
+ *
+ * use '1' for electric, '0' for non-electric
+ *
+ * @since 17.0.0
+ */
+ public const VEHICLE_IS_ELECTRIC = '{http://nextcloud.com/ns}resource-vehicle-is-electric';
+
+ /**
+ * Range of vehicle with a full tank
+ *
+ * @since 17.0.0
+ */
+ public const VEHICLE_RANGE = '{http://nextcloud.com/ns}resource-vehicle-range';
+
+ /**
+ * Seating capacity of the vehicle
+ *
+ * @since 17.0.0
+ */
+ public const VEHICLE_SEATING_CAPACITY = '{http://nextcloud.com/ns}resource-vehicle-seating-capacity';
+}
interface IRoom {
/**
- * get the room id
+ * Get a unique ID for the room
*
* This id has to be unique within the backend
*
public function getId():string;
/**
- * get the display name for a room
+ * Get the display name for the room
*
* @return string
* @since 14.0.0
public function getGroupRestrictions():array;
/**
- * get email-address for room
+ * Get the email-address for the room
*
- * The email address has to be globally unique
+ * The email-address has to be globally unique
*
* @return string
* @since 14.0.0
--- /dev/null
+<?php
+/**
+ * @copyright 2019, Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @author Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Calendar\Room;
+
+/**
+ * Interface IRoomMetadata
+ *
+ * This interface provides keys for common metadata.
+ * Room Backends are not limited to this list and can provide
+ * any metadata they want.
+ *
+ * @package OCP\Calendar\Room
+ * @since 17.0.0
+ */
+interface IRoomMetadata {
+
+ /**
+ * Type of room
+ *
+ * Allowed values for this key include:
+ * - meeting-room
+ * - lecture-hall
+ * - seminar-room
+ * - other
+ *
+ * @since 17.0.0
+ */
+ public const ROOM_TYPE = '{http://nextcloud.com/ns}room-type';
+
+ /**
+ * Seating capacity of the room
+ *
+ * @since 17.0.0
+ */
+ public const CAPACITY = '{http://nextcloud.com/ns}room-seating-capacity';
+}