@@ -1535,6 +1535,47 @@ public object FfiConverterTypeRoomPowerLevelChanges: FfiConverterRustBuffer<Room
15351535
15361536
15371537
1538+ /* *
1539+ * Information about the server vendor obtained from the federation API.
1540+ */
1541+ data class ServerVendorInfo (
1542+ /* *
1543+ * The server name.
1544+ */
1545+ var `serverName`: kotlin.String ,
1546+ /* *
1547+ * The server version.
1548+ */
1549+ var `version`: kotlin.String
1550+ ) {
1551+
1552+ companion object
1553+ }
1554+
1555+ /* *
1556+ * @suppress
1557+ */
1558+ public object FfiConverterTypeServerVendorInfo: FfiConverterRustBuffer<ServerVendorInfo> {
1559+ override fun read (buf : ByteBuffer ): ServerVendorInfo {
1560+ return ServerVendorInfo (
1561+ FfiConverterString .read(buf),
1562+ FfiConverterString .read(buf),
1563+ )
1564+ }
1565+
1566+ override fun allocationSize (value : ServerVendorInfo ) = (
1567+ FfiConverterString .allocationSize(value.`serverName`) +
1568+ FfiConverterString .allocationSize(value.`version`)
1569+ )
1570+
1571+ override fun write (value : ServerVendorInfo , buf : ByteBuffer ) {
1572+ FfiConverterString .write(value.`serverName`, buf)
1573+ FfiConverterString .write(value.`version`, buf)
1574+ }
1575+ }
1576+
1577+
1578+
15381579/* *
15391580 * Properties to create a new virtual Element Call widget.
15401581 */
@@ -1657,7 +1698,12 @@ data class VirtualElementCallWidgetOptions (
16571698 * - `false`: the webview shows a a list of devices injected by the
16581699 * client. (used on ios & android)
16591700 */
1660- var `controlledMediaDevices`: kotlin.Boolean
1701+ var `controlledMediaDevices`: kotlin.Boolean ,
1702+ /* *
1703+ * Whether and what type of notification Element Call should send, when
1704+ * starting a call.
1705+ */
1706+ var `sendNotificationType`: NotificationType ?
16611707) {
16621708
16631709 companion object
@@ -1689,6 +1735,7 @@ public object FfiConverterTypeVirtualElementCallWidgetOptions: FfiConverterRustB
16891735 FfiConverterOptionalString .read(buf),
16901736 FfiConverterOptionalString .read(buf),
16911737 FfiConverterBoolean .read(buf),
1738+ FfiConverterOptionalTypeNotificationType .read(buf),
16921739 )
16931740 }
16941741
@@ -1712,7 +1759,8 @@ public object FfiConverterTypeVirtualElementCallWidgetOptions: FfiConverterRustB
17121759 FfiConverterOptionalString .allocationSize(value.`rageshakeSubmitUrl`) +
17131760 FfiConverterOptionalString .allocationSize(value.`sentryDsn`) +
17141761 FfiConverterOptionalString .allocationSize(value.`sentryEnvironment`) +
1715- FfiConverterBoolean .allocationSize(value.`controlledMediaDevices`)
1762+ FfiConverterBoolean .allocationSize(value.`controlledMediaDevices`) +
1763+ FfiConverterOptionalTypeNotificationType .allocationSize(value.`sendNotificationType`)
17161764 )
17171765
17181766 override fun write (value : VirtualElementCallWidgetOptions , buf : ByteBuffer ) {
@@ -1736,6 +1784,7 @@ public object FfiConverterTypeVirtualElementCallWidgetOptions: FfiConverterRustB
17361784 FfiConverterOptionalString .write(value.`sentryDsn`, buf)
17371785 FfiConverterOptionalString .write(value.`sentryEnvironment`, buf)
17381786 FfiConverterBoolean .write(value.`controlledMediaDevices`, buf)
1787+ FfiConverterOptionalTypeNotificationType .write(value.`sendNotificationType`, buf)
17391788 }
17401789}
17411790
@@ -1978,6 +2027,45 @@ public object FfiConverterTypeIntent: FfiConverterRustBuffer<Intent> {
19782027
19792028
19802029
2030+ /* *
2031+ * Types of call notifications.
2032+ */
2033+
2034+ enum class NotificationType {
2035+
2036+ /* *
2037+ * The receiving client should display a visual notification.
2038+ */
2039+ NOTIFICATION ,
2040+ /* *
2041+ * The receiving client should ring with an audible sound.
2042+ */
2043+ RING ;
2044+ companion object
2045+ }
2046+
2047+
2048+ /* *
2049+ * @suppress
2050+ */
2051+ public object FfiConverterTypeNotificationType: FfiConverterRustBuffer<NotificationType> {
2052+ override fun read (buf : ByteBuffer ) = try {
2053+ NotificationType .values()[buf.getInt() - 1 ]
2054+ } catch (e: IndexOutOfBoundsException ) {
2055+ throw RuntimeException (" invalid enum value, something is very wrong!!" , e)
2056+ }
2057+
2058+ override fun allocationSize (value : NotificationType ) = 4UL
2059+
2060+ override fun write (value : NotificationType , buf : ByteBuffer ) {
2061+ buf.putInt(value.ordinal + 1 )
2062+ }
2063+ }
2064+
2065+
2066+
2067+
2068+
19812069/* *
19822070 * Current state of a [`Paginator`].
19832071 */
@@ -2166,6 +2254,19 @@ public object FfiConverterTypeQRCodeLoginError : FfiConverterRustBuffer<QrCodeLo
21662254
21672255enum class RoomMemberRole {
21682256
2257+ /* *
2258+ * The member is a creator.
2259+ *
2260+ * A creator has an infinite power level and cannot be demoted, so this
2261+ * role is immutable. A room can have several creators.
2262+ *
2263+ * It is available in room versions where
2264+ * `explicitly_privilege_room_creators` in [`AuthorizationRules`] is set to
2265+ * `true`.
2266+ *
2267+ * [`AuthorizationRules`]: ruma::room_version_rules::AuthorizationRules
2268+ */
2269+ CREATOR ,
21692270 /* *
21702271 * The member is an administrator.
21712272 */
@@ -2470,3 +2571,35 @@ public object FfiConverterOptionalTypeIntent: FfiConverterRustBuffer<Intent?> {
24702571 }
24712572}
24722573
2574+
2575+
2576+
2577+ /* *
2578+ * @suppress
2579+ */
2580+ public object FfiConverterOptionalTypeNotificationType: FfiConverterRustBuffer<NotificationType?> {
2581+ override fun read (buf : ByteBuffer ): NotificationType ? {
2582+ if (buf.get().toInt() == 0 ) {
2583+ return null
2584+ }
2585+ return FfiConverterTypeNotificationType .read(buf)
2586+ }
2587+
2588+ override fun allocationSize (value : NotificationType ? ): ULong {
2589+ if (value == null ) {
2590+ return 1UL
2591+ } else {
2592+ return 1UL + FfiConverterTypeNotificationType .allocationSize(value)
2593+ }
2594+ }
2595+
2596+ override fun write (value : NotificationType ? , buf : ByteBuffer ) {
2597+ if (value == null ) {
2598+ buf.put(0 )
2599+ } else {
2600+ buf.put(1 )
2601+ FfiConverterTypeNotificationType .write(value, buf)
2602+ }
2603+ }
2604+ }
2605+
0 commit comments