libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
Quotient Namespace Reference

Namespaces

namespace  EventContent
 
namespace  EventStatus
 
namespace  FileMetadataMap
 
namespace  Literals
 
namespace  LoginFlows
 Predefined login flows.
 

Classes

class  AbstractEventMetaType
 The base class for event metatypes. More...
 
class  AccountRegistry
 
class  AccountSettings
 A group of settings for one Matrix account. More...
 
class  Add3PIDJob
 Adds contact information to the user's account. More...
 
class  asKeyValueRange
 An adaptor for Qt (hash-)maps to make them iterable in STL style. More...
 
struct  AuthenticationData
 Used by clients to submit authentication information to the interactive-authentication API. More...
 
class  Avatar
 
class  BanJob
 Ban a user in the room. More...
 
class  BaseJob
 
class  Bind3PIDJob
 Binds a 3PID to the user's account through an Identity Service. More...
 
struct  BooleanCapability
 
class  CallEvent
 
class  CallHangupEvent
 
class  CallInviteEvent
 
class  ChangePasswordJob
 Changes a user's password. More...
 
class  CheckUsernameAvailabilityJob
 Checks to see if a username is available on the server. More...
 
class  ClaimKeysJob
 Claim one-time encryption keys. More...
 
class  Connection
 
class  ConnectionData
 
class  ConnectionsGuard
 A guard pointer that disconnects an interested object upon destruction. More...
 
class  CreateContentJob
 Create a new mxc:// URI without uploading the content. More...
 
class  CreateRoomJob
 Create a new room. More...
 
struct  CrossSigningKey
 Cross signing key. More...
 
struct  CStructDeleter
 
struct  Curve25519Encrypted
 
class  Database
 
class  DeactivateAccountJob
 Deactivate a user's account. More...
 
class  DefineFilterJob
 Upload a new filter. More...
 
class  Delete3pidFromAccountJob
 Deletes a third-party identifier from the user's account. More...
 
class  DeleteDeviceJob
 Delete a device. More...
 
class  DeleteDevicesJob
 Bulk deletion of devices. More...
 
class  DeletePushRuleJob
 Delete a push rule. More...
 
class  DeleteRoomAliasJob
 Remove a mapping of room alias to room ID. More...
 
class  DeleteRoomKeyBySessionIdJob
 Delete a key from the backup. More...
 
class  DeleteRoomKeysByRoomIdJob
 Delete the keys from the backup for a given room. More...
 
class  DeleteRoomKeysJob
 Delete the keys from the backup. More...
 
class  DeleteRoomKeysVersionJob
 Delete an existing key backup. More...
 
class  DeleteRoomTagJob
 Remove a tag from the room. More...
 
struct  Device
 A client device. More...
 
struct  DeviceKeys
 Device identity keys. More...
 
struct  DevicesList
 
class  DirectChatEvent
 
struct  DiscoveryInformation
 
class  DownloadFileJob
 
class  DummyEvent
 
struct  EmailValidationData
 
struct  EmojiEntry
 
class  EncryptedEvent
 
struct  EncryptedFileMetadata
 
class  EncryptionEvent
 
class  EncryptionEventContent
 
class  Event
 
struct  EventFilter
 
class  EventItemBase
 
class  EventMetaType
 A family of event meta-types to load and match events. More...
 
struct  EventRelation
 
struct  EventStats
 Counters of unread events and highlights with a precision flag. More...
 
class  EventTemplate
 A template base class to derive your event type from. More...
 
class  EventTemplate< EventT, CallEvent >
 
class  EventTemplate< EventT, CallEvent, ContentT >
 
class  EventTemplate< EventT, StateEvent, ContentT >
 
class  Expected
 A minimal subset of std::expected from C++23. More...
 
struct  FieldType
 Definition of valid values for a field. More...
 
class  FileTransferInfo
 
struct  Filter
 
class  FixedBuffer
 
class  FixedBufferBase
 Non-template base for owning byte span classes. More...
 
class  ForgetRoomJob
 Stop the requesting user remembering about a particular room. More...
 
struct  function_traits
 Determine traits of an arbitrary function/lambda/functor. More...
 
struct  function_traits< ReturnT(ArgTs...)>
 
class  GenerateLoginTokenJob
 Optional endpoint to generate a single-use, time-limited, m.login.token token. More...
 
class  GetAccount3PIDsJob
 Gets a list of a user's third-party identifiers. More...
 
class  GetAccountDataJob
 Get some account data for the user. More...
 
class  GetAccountDataPerRoomJob
 Get some account data for the user that is specific to a room. More...
 
class  GetAvatarUrlJob
 Get the user's avatar URL. More...
 
class  GetCapabilitiesJob
 Gets information about the server's capabilities. More...
 
class  GetConfigAuthedJob
 Get the configuration for the content repository. More...
 
class  GetConfigJob
 Get the configuration for the content repository. More...
 
class  GetContentAuthedJob
 Download content from the content repository. More...
 
class  GetContentJob
 Download content from the content repository. More...
 
class  GetContentOverrideNameAuthedJob
 Download content from the content repository overriding the file name. More...
 
class  GetContentOverrideNameJob
 Download content from the content repository overriding the file name. More...
 
class  GetContentThumbnailAuthedJob
 Download a thumbnail of content from the content repository. More...
 
class  GetContentThumbnailJob
 Download a thumbnail of content from the content repository. More...
 
class  GetDeviceJob
 Get a single device. More...
 
class  GetDevicesJob
 List registered devices for the current user. More...
 
class  GetDisplayNameJob
 Get the user's display name. More...
 
class  GetEventByTimestampJob
 Get the closest event ID to the given timestamp. More...
 
class  GetEventContextJob
 Get events and state around the specified event. More...
 
class  GetFilterJob
 Download a filter. More...
 
class  GetJoinedMembersByRoomJob
 Gets the list of currently joined users and their profile data. More...
 
class  GetJoinedRoomsJob
 Lists the user's current rooms. More...
 
class  GetKeysChangesJob
 Query users with recent device key updates. More...
 
class  GetLocalAliasesJob
 Get a list of local aliases on a given room. More...
 
class  GetLoginFlowsJob
 Get the supported login types to authenticate users. More...
 
class  GetMembersByRoomJob
 Get the m.room.member events for the room. More...
 
class  GetNotificationsJob
 Gets a list of events that the user has been notified about. More...
 
class  GetOneRoomEventJob
 Get a single event by event ID. More...
 
class  GetPresenceJob
 Get this user's presence state. More...
 
class  GetProtocolMetadataJob
 Retrieve metadata about a specific protocol that the homeserver supports. More...
 
class  GetProtocolsJob
 Retrieve metadata about all protocols that a homeserver supports. More...
 
class  GetPublicRoomsJob
 Lists the public rooms on the server. More...
 
class  GetPushersJob
 Gets the current pushers for the authenticated user. More...
 
class  GetPushRuleActionsJob
 The actions for a push rule. More...
 
class  GetPushRuleJob
 Retrieve a push rule. More...
 
class  GetPushRulesGlobalJob
 Retrieve all push rules. More...
 
class  GetPushRulesJob
 Retrieve all push rulesets. More...
 
class  GetRelatingEventsJob
 Get the child events for a given parent event. More...
 
class  GetRelatingEventsWithRelTypeAndEventTypeJob
 Get the child events for a given parent event, with a given relType and eventType. More...
 
class  GetRelatingEventsWithRelTypeJob
 Get the child events for a given parent event, with a given relType. More...
 
class  GetRoomEventsJob
 Get a list of events for this room. More...
 
class  GetRoomIdByAliasJob
 Get the room ID corresponding to this room alias. More...
 
class  GetRoomKeyBySessionIdJob
 Retrieve a key from the backup. More...
 
class  GetRoomKeysByRoomIdJob
 Retrieve the keys from the backup for a given room. More...
 
class  GetRoomKeysJob
 Retrieve the keys from the backup. More...
 
class  GetRoomKeysVersionCurrentJob
 Get information about the latest backup version. More...
 
class  GetRoomKeysVersionJob
 Get information about an existing backup. More...
 
class  GetRoomStateJob
 Get all state events in the current state of a room. More...
 
class  GetRoomStateWithKeyJob
 Get the state identified by the type and key. More...
 
class  GetRoomTagsJob
 List the tags for a room. More...
 
class  GetRoomVisibilityOnDirectoryJob
 Gets the visibility of a room in the directory. More...
 
class  GetSpaceHierarchyJob
 Retrieve a portion of a space tree. More...
 
class  GetThreadRootsJob
 Fetches a list of the threads in a room. More...
 
class  GetTokenOwnerJob
 Gets information about the owner of an access token. More...
 
class  GetTurnServerJob
 Obtain TURN server credentials. More...
 
class  GetUrlPreviewAuthedJob
 Get information about a URL for a client. More...
 
class  GetUrlPreviewJob
 Get information about a URL for a client. More...
 
class  GetUserProfileJob
 Get this user's profile information. More...
 
class  GetVersionsJob
 Gets the versions of the specification supported by the server. More...
 
class  GetWellknownJob
 Gets Matrix server discovery information about the domain. More...
 
class  GetWellknownSupportJob
 Gets homeserver contacts and support details. More...
 
class  GetWhoIsJob
 Gets information about a particular user. More...
 
struct  HashMapFromJson
 
struct  HashQ
 This is only to make UnorderedMap alias work until we get rid of it. More...
 
struct  HkdfKeys
 
struct  HomeserverData
 
struct  HomeserverInformation
 Used by clients to discover homeserver information. More...
 
struct  IdentityKeys
 
struct  IdentityServerInformation
 Used by clients to discover identity server information. More...
 
class  InviteBy3PIDJob
 Invite a user to participate in a particular room. More...
 
class  InviteUserJob
 Invite a user to participate in a particular room. More...
 
class  IsPushRuleEnabledJob
 Get whether a push rule is enabled. More...
 
struct  JobBackoffStrategy
 
class  JobHandle
 A job pointer and a QFuture in a single package. More...
 
class  JoinRoomByIdJob
 Start the requesting user participating in a particular room. More...
 
class  JoinRoomJob
 Start the requesting user participating in a particular room. More...
 
struct  JsonArrayConverter
 
struct  JsonConverter
 The switchboard for extra conversion algorithms behind from/toJson. More...
 
struct  JsonConverter< event_ptr_tt< EventT > >
 
struct  JsonConverter< EventContent::SingleKeyValue< ValueT, KeyStr > >
 
struct  JsonConverter< PowerLevelsEventContent >
 
struct  JsonConverter< QList< T > >
 
struct  JsonConverter< QStringList >
 
struct  JsonConverter< QUrl >
 
struct  JsonConverter< QVariant >
 
struct  JsonConverter< std::array< T, N > >
 
struct  JsonConverter< std::optional< T > >
 
struct  JsonConverter< std::variant< QString, T > >
 
struct  JsonConverter< std::vector< T > >
 
struct  JsonObjectConverter
 
struct  JsonObjectConverter< AuthenticationData >
 
struct  JsonObjectConverter< BooleanCapability >
 
struct  JsonObjectConverter< CreateRoomJob::Invite3pid >
 
struct  JsonObjectConverter< CreateRoomJob::StateEvent >
 
struct  JsonObjectConverter< CrossSigningKey >
 
struct  JsonObjectConverter< Device >
 
struct  JsonObjectConverter< DeviceKeys >
 
struct  JsonObjectConverter< DevicesList >
 
struct  JsonObjectConverter< DiscoveryInformation >
 
struct  JsonObjectConverter< EmailValidationData >
 
struct  JsonObjectConverter< EncryptedFileMetadata >
 
struct  JsonObjectConverter< EventFilter >
 
struct  JsonObjectConverter< EventRelation >
 
struct  JsonObjectConverter< FieldType >
 
struct  JsonObjectConverter< Filter >
 
struct  JsonObjectConverter< GetAccount3PIDsJob::ThirdPartyIdentifier >
 
struct  JsonObjectConverter< GetCapabilitiesJob::Capabilities >
 
struct  JsonObjectConverter< GetCapabilitiesJob::RoomVersionsCapability >
 
struct  JsonObjectConverter< GetJoinedMembersByRoomJob::RoomMember >
 
struct  JsonObjectConverter< GetLoginFlowsJob::LoginFlow >
 
struct  JsonObjectConverter< GetNotificationsJob::Notification >
 
struct  JsonObjectConverter< GetPushersJob::Pusher >
 
struct  JsonObjectConverter< GetPushersJob::PusherData >
 
struct  JsonObjectConverter< GetSpaceHierarchyJob::SpaceHierarchyRoomsChunk >
 
struct  JsonObjectConverter< GetWellknownSupportJob::Contact >
 
struct  JsonObjectConverter< GetWhoIsJob::ConnectionInfo >
 
struct  JsonObjectConverter< GetWhoIsJob::DeviceInfo >
 
struct  JsonObjectConverter< GetWhoIsJob::SessionInfo >
 
struct  JsonObjectConverter< HomeserverInformation >
 
struct  JsonObjectConverter< IdentityServerInformation >
 
struct  JsonObjectConverter< JWK >
 
struct  JsonObjectConverter< KeyBackupData >
 
struct  JsonObjectConverter< MsisdnValidationData >
 
struct  JsonObjectConverter< OpenIdCredentials >
 
struct  JsonObjectConverter< Post3PIDsJob::ThreePidCredentials >
 
struct  JsonObjectConverter< PostPusherJob::PusherData >
 
struct  JsonObjectConverter< ProtocolInstance >
 
struct  JsonObjectConverter< PublicRoomsChunk >
 
struct  JsonObjectConverter< PushCondition >
 
struct  JsonObjectConverter< PushRule >
 
struct  JsonObjectConverter< PushRuleset >
 
struct  JsonObjectConverter< QHash< QString, T > >
 
struct  JsonObjectConverter< QSet< QString > >
 
struct  JsonObjectConverter< QueryKeysJob::DeviceInformation >
 
struct  JsonObjectConverter< QueryKeysJob::UnsignedDeviceInfo >
 
struct  JsonObjectConverter< QueryPublicRoomsJob::Filter >
 
struct  JsonObjectConverter< RequestTokenResponse >
 
struct  JsonObjectConverter< RoomEventFilter >
 
struct  JsonObjectConverter< RoomFilter >
 
struct  JsonObjectConverter< RoomKeyBackup >
 
struct  JsonObjectConverter< RoomSummary >
 
struct  JsonObjectConverter< SearchJob::Categories >
 
struct  JsonObjectConverter< SearchJob::EventContext >
 
struct  JsonObjectConverter< SearchJob::Group >
 
struct  JsonObjectConverter< SearchJob::Groupings >
 
struct  JsonObjectConverter< SearchJob::GroupValue >
 
struct  JsonObjectConverter< SearchJob::IncludeEventContext >
 
struct  JsonObjectConverter< SearchJob::Result >
 
struct  JsonObjectConverter< SearchJob::ResultCategories >
 
struct  JsonObjectConverter< SearchJob::ResultRoomEvents >
 
struct  JsonObjectConverter< SearchJob::RoomEventsCriteria >
 
struct  JsonObjectConverter< SearchJob::UserProfile >
 
struct  JsonObjectConverter< SearchUserDirectoryJob::User >
 
struct  JsonObjectConverter< std::unordered_map< QString, T, HashT > >
 
struct  JsonObjectConverter< Tag >
 
struct  JsonObjectConverter< ThirdPartyLocation >
 
struct  JsonObjectConverter< ThirdPartyProtocol >
 
struct  JsonObjectConverter< ThirdPartySigned >
 
struct  JsonObjectConverter< ThirdPartyUser >
 
struct  JsonObjectConverter< UserIdentifier >
 
struct  JsonObjectUnpacker
 
struct  JWK
 
struct  KeyBackupData
 The key data. More...
 
class  KeyedStateEventBase
 
class  KeyImport
 
class  KeylessStateEventBase
 
class  KeyVerificationAcceptEvent
 Accepts a previously sent m.key.verification.start message. More...
 
class  KeyVerificationCancelEvent
 
class  KeyVerificationDoneEvent
 
class  KeyVerificationEvent
 
class  KeyVerificationKeyEvent
 Sends the ephemeral public key for a device to the partner device. More...
 
class  KeyVerificationMacEvent
 Sends the MAC of a device's key to the partner device. More...
 
class  KeyVerificationReadyEvent
 
class  KeyVerificationRequestEvent
 Requests a key verification with another user's devices. More...
 
class  KeyVerificationSession
 
class  KeyVerificationStartEvent
 Begins a key verification process. More...
 
class  KickJob
 Kick a user from the room. More...
 
class  KnockRoomJob
 Knock on a room, requesting permission to join. More...
 
class  LeaveRoomJob
 Stop the requesting user participating in a particular room. More...
 
class  LoginJob
 Authenticates the user. More...
 
class  LogoutAllJob
 Invalidates all access tokens for a user. More...
 
class  LogoutJob
 Invalidates a user access token. More...
 
class  MediaThumbnailJob
 
class  MemberEventContent
 
struct  MemberSorter
 
class  Mocked
 
struct  MsisdnValidationData
 
class  MxcReply
 
class  NetworkAccessManager
 
class  NetworkSettings
 
struct  Notification
 
struct  OpenIdCredentials
 
struct  Overloads
 Multiplex several functors in one. More...
 
class  PeekEventsJob
 Listen on the event stream of a particular room. More...
 
class  PendingEventItem
 
class  PicklingKey
 
class  Post3PIDsJob
 Adds contact information to the user's account. More...
 
class  PostPusherJob
 Modify a pusher for this user on the homeserver. More...
 
class  PostReceiptJob
 Send a receipt for the given event ID. More...
 
class  PostRoomKeysVersionJob
 Create a new backup. More...
 
struct  PowerLevelsEventContent
 
struct  ProtocolInstance
 
struct  PublicRoomsChunk
 
struct  PushCondition
 
struct  PushRule
 
struct  PushRuleset
 
class  PutRoomKeyBySessionIdJob
 Store a key in the backup. More...
 
class  PutRoomKeysByRoomIdJob
 Store several keys in the backup for a given room. More...
 
class  PutRoomKeysJob
 Store several keys in the backup. More...
 
class  PutRoomKeysVersionJob
 Update information about an existing backup. More...
 
class  QOlmAccount
 
class  QOlmInboundGroupSession
 
class  QOlmMessage
 A wrapper around an olm encrypted message. More...
 
class  QOlmOutboundGroupSession
 
class  QOlmSession
 Either an outbound or inbound session for secure communication. More...
 
class  QOlmUtility
 
class  QueryKeysJob
 Download device identity keys. More...
 
class  QueryLocationByAliasJob
 Reverse-lookup third-party locations given a Matrix room alias. More...
 
class  QueryLocationByProtocolJob
 Retrieve Matrix-side portals rooms leading to a third-party location. More...
 
class  QueryPublicRoomsJob
 Lists the public rooms on the server with optional filter. More...
 
class  QueryUserByIDJob
 Reverse-lookup third-party users given a Matrix User ID. More...
 
class  QueryUserByProtocolJob
 Retrieve the Matrix User ID of a corresponding third-party user. More...
 
class  Range
 
class  ReactionEvent
 
class  ReadReceipt
 Data structure for a room member's read receipt. More...
 
class  ReceiptEvent
 
struct  ReceiptsForEvent
 
class  RedactEventJob
 Strips all non-integrity-critical information out of an event. More...
 
class  RedactionEvent
 
class  RedirectToIdPJob
 Redirect the user's browser to the SSO interface for an IdP. More...
 
class  RedirectToSSOJob
 Redirect the user's browser to the SSO interface. More...
 
class  RefreshJob
 Refresh an access token. More...
 
class  RegisterJob
 Register for an account on this homeserver. More...
 
class  RegistrationTokenValidityJob
 Query if a given registration token is still valid. More...
 
class  ReportContentJob
 Report an event in a joined room as inappropriate. More...
 
class  RequestData
 
class  RequestOpenIdTokenJob
 Get an OpenID token object to verify the requester's identity. More...
 
struct  RequestTokenResponse
 
class  RequestTokenTo3PIDEmailJob
 Begins the validation process for an email address for association with the user's account. More...
 
class  RequestTokenTo3PIDMSISDNJob
 Begins the validation process for a phone number for association with the user's account. More...
 
class  RequestTokenToRegisterEmailJob
 Begins the validation process for an email to be used during registration. More...
 
class  RequestTokenToRegisterMSISDNJob
 Requests a validation token be sent to the given phone number for the purpose of registering an account. More...
 
class  RequestTokenToResetPasswordEmailJob
 Requests a validation token be sent to the given email address for the purpose of resetting a user's password. More...
 
class  RequestTokenToResetPasswordMSISDNJob
 Requests a validation token be sent to the given phone number for the purpose of resetting a user's password. More...
 
class  Room
 
class  RoomAvatarEvent
 
class  RoomCanonicalAliasEvent
 
class  RoomCreateEvent
 
class  RoomEvent
 
struct  RoomEventFilter
 
struct  RoomFilter
 Filters to be applied to room data. More...
 
struct  RoomKeyBackup
 The backed up keys for a room. More...
 
class  RoomKeyEvent
 
class  RoomMember
 Representation of a user state in a room. More...
 
class  RoomMemberEvent
 
class  RoomMessageEvent
 
class  RoomPowerLevelsEvent
 
class  RoomServerAclEvent
 
class  RoomStateView
 
struct  RoomSummary
 Room summary, as defined in MSC688. More...
 
class  RoomTombstoneEvent
 
class  SearchJob
 Perform a server-side search. More...
 
class  SearchUserDirectoryJob
 Searches the user directory. More...
 
class  SendMessageJob
 Send a message event to the given room. More...
 
class  SendToDeviceJob
 Send an event to a given set of devices. More...
 
class  SetAccountDataJob
 Set some account data for the user. More...
 
class  SetAccountDataPerRoomJob
 Set some account data for the user that is specific to a room. More...
 
class  SetAvatarUrlJob
 Set the user's avatar URL. More...
 
class  SetDisplayNameJob
 Set the user's display name. More...
 
class  SetPresenceJob
 Update this user's presence state. More...
 
class  SetPushRuleActionsJob
 Set the actions for a push rule. More...
 
class  SetPushRuleEnabledJob
 Enable or disable a push rule. More...
 
class  SetPushRuleJob
 Add or change a push rule. More...
 
class  SetReadMarkerJob
 Set the position of the read marker for a room. More...
 
class  SetRoomAliasJob
 Create a new mapping from room alias to room ID. More...
 
class  SetRoomStateWithKeyJob
 Send a state event to the given room. More...
 
class  SetRoomTagJob
 Add a tag to a room. More...
 
class  SetRoomVisibilityOnDirectoryJob
 Sets the visibility of a room in the room directory. More...
 
class  Settings
 
class  SettingsGroup
 
class  SetTypingJob
 Informs the server that the user has started or stopped typing. More...
 
class  SignedOneTimeKey
 
class  SsoSession
 
class  SSSSHandler
 
class  StateEvent
 
class  StickerEvent
 
class  SyncData
 
class  SyncJob
 
class  SyncRoomData
 
struct  Tag
 
struct  ThirdPartyLocation
 
struct  ThirdPartyProtocol
 
struct  ThirdPartySigned
 
struct  ThirdPartyUser
 
class  Thread
 
class  TimelineItem
 
class  UnbanJob
 Unban a user from the room. More...
 
class  Unbind3pidFromAccountJob
 Removes a user's third-party identifier from an identity server. More...
 
struct  UnsignedOneTimeKeys
 Struct representing the one-time keys. More...
 
class  UpdateAppserviceRoomDirectoryVisibilityJob
 Updates a room's visibility in the application service's room directory. More...
 
class  UpdateDeviceJob
 Update a device. More...
 
class  UpgradeRoomJob
 Upgrades a room to a new room version. More...
 
class  UploadContentJob
 Upload some content to the content repository. More...
 
class  UploadContentToMXCJob
 Upload content to an mxc:// URI that was created earlier. More...
 
class  UploadCrossSigningKeysJob
 Upload cross-signing keys. More...
 
class  UploadCrossSigningSignaturesJob
 Upload cross-signing signatures. More...
 
class  UploadKeysJob
 Upload end-to-end encryption keys. More...
 
class  Uri
 A wrapper around a Matrix URI or identifier. More...
 
class  UriDispatcher
 Resolve the resource and invoke an action on it, via Qt signals. More...
 
class  UriResolverBase
 Abstract class to resolve the resource and act on it. More...
 
class  User
 
struct  UserIdentifier
 Identification information for a user. More...
 
struct  UserTimestamp
 

Concepts

concept  EventClass
 
concept  Keyed_State_Event
 
concept  Keyless_State_Event
 
concept  BoundResultHandler
 
concept  ResultHandler
 
concept  Keyed_State_Fn
 
concept  Keyless_State_Fn
 

Typedefs

using LoginFlow = GetLoginFlowsJob::LoginFlow
 
using room_factory_t = std::function< Room *(Connection *, const QString &, JoinState)>
 
using user_factory_t = std::function< User *(Connection *, const QString &)>
 
using DirectChatsMap = QMultiHash< const User *, QString >
 
using IgnoredUsersList = IgnoredUsersEvent::value_type
 
using SslErrorCode = unsigned long
 
template<size_t Size = DefaultPbkdf2KeyLength>
using key_material_t = std::array< byte_t, Size >
 
using key_view_t = byte_view_t< DefaultPbkdf2KeyLength >
 
template<typename T >
using SslExpected = Expected< T, SslErrorCode >
 Same as QOlmExpected but for wrapping OpenSSL instead of Olm calls.
 
template<typename T >
using QOlmExpected = Expected< T, OlmErrorCode >
 
using byte_t = uint8_t
 
template<size_t N = std::dynamic_extent>
using byte_view_t = std::span< const byte_t, N >
 
template<size_t N = std::dynamic_extent>
using byte_span_t = std::span< byte_t, N >
 
using OneTimeKeys = QHash< QString, std::variant< QString, SignedOneTimeKey > >
 
using QOlmInboundGroupSessionPtr = std::unique_ptr< QOlmInboundGroupSession >
 
using TagRecord = Tag
 
using TagsMap = QHash< QString, Tag >
 
template<typename EventT >
using event_ptr_tt = std::unique_ptr< EventT >
 
using event_type_t = QLatin1String
 
using EventPtr = event_ptr_tt< Event >
 
template<EventClass EventT>
using EventsArray = std::vector< event_ptr_tt< EventT > >
 
using Events = EventsArray< Event >
 
using FileSourceInfo = std::variant< QUrl, EncryptedFileMetadata >
 
using FileSourceInfoKeys = std::array< QLatin1String, std::variant_size_v< FileSourceInfo > >
 
using EventsWithReceipts = QVector< ReceiptsForEvent >
 
using RoomEventPtr = event_ptr_tt< RoomEvent >
 
using RoomEvents = EventsArray< RoomEvent >
 
using RoomEventsRange = std::ranges::subrange< RoomEvents::iterator >
 
using MessageEventType = RoomMessageEvent::MsgType
 
using StateEventPtr = event_ptr_tt< StateEvent >
 
using StateEvents = EventsArray< StateEvent >
 
using StateEventKey = std::pair< QString, QString >
 
template<typename FnT , int ArgN = 0>
using fn_arg_t = std::tuple_element_t< ArgN, typename function_traits< FnT >::arg_types >
 
template<typename T >
using Omittable = std::optional< T >
 
using SyncDataList = std::vector< SyncRoomData >
 
template<typename KeyT , typename ValT >
using UnorderedMap = std::unordered_map< KeyT, ValT, HashQ< KeyT > >
 A wrapper around std::unordered_map compatible with types that have qHash.
 
using DeleteLater = QScopedPointerDeleteLater
 Common custom deleter for std::unique_ptr and QScopedPointer.
 
template<std::derived_from< QObject > T>
using QObjectHolder = std::unique_ptr< T, DeleteLater >
 
template<typename ImplType , typename TypeToDelete = ImplType>
using ImplPtr = std::unique_ptr< ImplType, void(*)(TypeToDelete *)>
 An owning implementation pointer.
 
template<typename T >
using CStructPtr = std::unique_ptr< T, CStructDeleter< T > >
 An owning pointer to a C structure.
 
using UserId = QString
 
using RoomId = QString
 
using EventId = QString
 

Enumerations

enum  SslErrorCodes : SslErrorCode { SslErrorUserOffset = 128 , WrongDerivedKeyLength = SslErrorUserOffset + 1 , SslPayloadTooLong = SslErrorUserOffset + 2 }
 
enum class  HttpVerb { Get , Put , Post , Delete }
 
enum class  Membership : uint16_t {
  Invalid = 0x0 , Join = 0x1 , Leave = 0x2 , Invite = 0x4 ,
  Knock = 0x8 , Ban = 0x10 , Undefined = Invalid
}
 Membership states. More...
 
enum class  JoinState : std::underlying_type_t< Membership > {
  Invalid = std::underlying_type_t<Membership>(Membership::Invalid) , Join = std::underlying_type_t<Membership>(Membership::Join) , Leave = std::underlying_type_t<Membership>(Membership::Leave) , Invite = std::underlying_type_t<Membership>(Membership::Invite) ,
  Knock = std::underlying_type_t<Membership>(Membership::Knock)
}
 Local user join-state names. More...
 
enum  RunningPolicy { ForegroundRequest = 0x0 , BackgroundRequest = 0x1 }
 Network job running policy flags. More...
 
enum  UriResolveResult : int8_t {
  StillResolving = -1 , UriResolved = 0 , CouldNotResolve , IncorrectAction ,
  InvalidUri , NoAccount
}
 The result of URI resolution using UriResolver. More...
 
enum class  RoomType : uint8_t { Space = 0 , Undefined = 0xFF }
 
enum class  EncryptionType : uint8_t { MegolmV1AesSha2 = 0 , Undefined = 0xFF }
 

Functions

bool operator== (const LoginFlow &lhs, const LoginFlow &rhs)
 
bool operator!= (const LoginFlow &lhs, const LoginFlow &rhs)
 
template<typename T = Room>
auto defaultRoomFactory (Connection *c, const QString &id, JoinState js)
 The default factory to create room objects.
 
template<typename T = User>
auto defaultUserFactory (Connection *c, const QString &id)
 The default factory to create user objects.
 
void editSubobject (QJsonObject &json, auto key, std::invocable< QJsonObject & > auto visitor)
 
void replaceSubvalue (QJsonObject &json, auto topLevelKey, auto subKey, QJsonValue subValue)
 
template<typename PodT , typename JsonT >
PodT fromJson (const JsonT &)
 
template<typename T >
auto toJson (const T &pod)
 
template<typename T >
void fillJson (QJsonObject &json, const T &data)
 
template<typename JsonT , typename PodT >
void fromJson (const JsonT &json, PodT &pod)
 
template<typename T >
void fillFromJson (const QJsonValue &jv, T &pod)
 
template<typename EnumT , typename EnumStringValuesT >
std::optional< EnumTenumFromJsonString (const QString &s, const EnumStringValuesT &enumValues)
 Facility string-to-enum converter.
 
template<typename EnumT , typename EnumStringValuesT >
QString enumToJsonString (EnumT v, const EnumStringValuesT &enumValues)
 Facility enum-to-string converter.
 
template<typename FlagT , typename FlagStringValuesT >
std::optional< FlagTflagFromJsonString (const QString &s, const FlagStringValuesT &flagValues)
 Facility converter for flags.
 
template<typename FlagT , typename FlagStringValuesT >
QString flagToJsonString (FlagT v, const FlagStringValuesT &flagValues)
 
template<>
bool fromJson (const QJsonValue &jv)
 
template<>
int fromJson (const QJsonValue &jv)
 
template<>
double fromJson (const QJsonValue &jv)
 
template<>
float fromJson (const QJsonValue &jv)
 
template<>
qint64 fromJson (const QJsonValue &jv)
 
template<>
QString fromJson (const QJsonValue &jv)
 
template<>
QByteArray fromJson (const QJsonValue &jv)=delete
 
template<>
QJsonArray fromJson (const QJsonValue &jv)
 
template<>
QJsonArray fromJson (const QJsonDocument &jd)
 
QJsonValue toJson (const QDateTime &val)
 
template<>
QDateTime fromJson (const QJsonValue &jv)
 
QJsonValue toJson (const QDate &val)
 
template<>
QDate fromJson (const QJsonValue &jv)
 
template<typename... Ts>
QJsonValue toJson (const std::variant< Ts... > &v)
 
QJsonObject QUOTIENT_API toJson (const QVariantHash &vh)
 
template<>
QVariantHash QUOTIENT_API fromJson (const QJsonValue &jv)
 
template<bool Force = true, typename ContT , typename KeyT , typename ValT >
void addParam (ContT &container, KeyT &&key, ValT &&value)
 
auto toSnakeCase (QLatin1String s)
 
auto collectResponse (const GetAccountDataJob *job)
 
auto collectResponse (const GetAccountDataPerRoomJob *job)
 
auto collectResponse (const GetAccount3PIDsJob *job)
 
QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED auto collectResponse (const Post3PIDsJob *job)
 
auto collectResponse (const Delete3pidFromAccountJob *job)
 
auto collectResponse (const Unbind3pidFromAccountJob *job)
 
auto collectResponse (const RequestTokenTo3PIDEmailJob *job)
 
auto collectResponse (const RequestTokenTo3PIDMSISDNJob *job)
 
auto collectResponse (const GetConfigAuthedJob *job)
 
auto collectResponse (const GetCapabilitiesJob *job)
 
auto collectResponse (const UploadContentJob *job)
 
QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED auto collectResponse (const GetConfigJob *job)
 
auto collectResponse (const CreateRoomJob *job)
 
auto collectResponse (const UploadCrossSigningSignaturesJob *job)
 
auto collectResponse (const GetDevicesJob *job)
 
auto collectResponse (const GetDeviceJob *job)
 
auto collectResponse (const GetLocalAliasesJob *job)
 
auto collectResponse (const DefineFilterJob *job)
 
auto collectResponse (const GetFilterJob *job)
 
auto collectResponse (const JoinRoomByIdJob *job)
 
auto collectResponse (const JoinRoomJob *job)
 
auto collectResponse (const PostRoomKeysVersionJob *job)
 
auto collectResponse (const GetRoomKeyBySessionIdJob *job)
 
auto collectResponse (const GetRoomKeysByRoomIdJob *job)
 
auto collectResponse (const GetRoomKeysJob *job)
 
auto collectResponse (const UploadKeysJob *job)
 
auto collectResponse (const KnockRoomJob *job)
 
auto collectResponse (const GetJoinedRoomsJob *job)
 
auto collectResponse (const GetRoomVisibilityOnDirectoryJob *job)
 
auto collectResponse (const GetLoginFlowsJob *job)
 
auto collectResponse (const RequestOpenIdTokenJob *job)
 
auto collectResponse (const GetDisplayNameJob *job)
 
auto collectResponse (const GetAvatarUrlJob *job)
 
auto collectResponse (const GetPushersJob *job)
 
auto collectResponse (const GetPushRulesJob *job)
 
auto collectResponse (const GetPushRulesGlobalJob *job)
 
auto collectResponse (const GetPushRuleJob *job)
 
auto collectResponse (const IsPushRuleEnabledJob *job)
 
auto collectResponse (const GetPushRuleActionsJob *job)
 
auto collectResponse (const RedactEventJob *job)
 
auto collectResponse (const RequestTokenToRegisterEmailJob *job)
 
auto collectResponse (const RequestTokenToRegisterMSISDNJob *job)
 
auto collectResponse (const RequestTokenToResetPasswordEmailJob *job)
 
auto collectResponse (const RequestTokenToResetPasswordMSISDNJob *job)
 
auto collectResponse (const DeactivateAccountJob *job)
 
auto collectResponse (const CheckUsernameAvailabilityJob *job)
 
auto collectResponse (const RegistrationTokenValidityJob *job)
 
auto collectResponse (const SendMessageJob *job)
 
auto collectResponse (const SetRoomStateWithKeyJob *job)
 
auto collectResponse (const UpgradeRoomJob *job)
 
auto collectResponse (GetOneRoomEventJob *job)
 
auto collectResponse (const GetRoomStateWithKeyJob *job)
 
auto collectResponse (GetRoomStateJob *job)
 
auto collectResponse (GetMembersByRoomJob *job)
 
auto collectResponse (const GetJoinedMembersByRoomJob *job)
 
auto collectResponse (const SearchJob *job)
 
auto collectResponse (const GetRoomTagsJob *job)
 
auto collectResponse (const GetProtocolsJob *job)
 
auto collectResponse (const GetProtocolMetadataJob *job)
 
auto collectResponse (const QueryLocationByProtocolJob *job)
 
auto collectResponse (const QueryUserByProtocolJob *job)
 
auto collectResponse (const QueryLocationByAliasJob *job)
 
auto collectResponse (const QueryUserByIDJob *job)
 
auto collectResponse (const GetTurnServerJob *job)
 
auto collectResponse (const GetWellknownJob *job)
 
QByteArray zeroedByteArray (QByteArray::size_type n=32)
 
template<size_t N, typename T = uint8_t>
consteval std::array< T, Nzeroes ()
 
template<size_t Size = DefaultPbkdf2KeyLength>
QUOTIENT_API SslExpected< key_material_t< Size > > pbkdf2HmacSha512 (const QByteArray &passphrase, const QByteArray &salt, int iterations)
 Generate a key out of the given passphrase.
 
QUOTIENT_API SslExpected< HkdfKeyshkdfSha256 (key_view_t key, byte_view_t< 32 > salt, byte_view_t<> info)
 Derive a key from the input data using HKDF-SHA256.
 
QUOTIENT_API SslExpected< QByteArray > hmacSha256 (byte_view_t< HmacKeySize > hmacKey, const QByteArray &data)
 Calculate a MAC from the given key and data.
 
QUOTIENT_API QOlmExpected< QByteArray > curve25519AesSha2Decrypt (QByteArray ciphertext, const QByteArray &privateKey, const QByteArray &ephemeral, const QByteArray &mac)
 Decrypt the data using Curve25519-AES-Sha256.
 
QUOTIENT_API QOlmExpected< Curve25519Encryptedcurve25519AesSha2Encrypt (const QByteArray &plaintext, const QByteArray &publicKey)
 Encrypt the data using Curve25519-AES-Sha256.
 
QUOTIENT_API SslExpected< QByteArray > aesCtr256Encrypt (const QByteArray &plaintext, byte_view_t< Aes256KeySize > key, byte_view_t< AesBlockSize > iv)
 Encrypt data using AES-CTR-256.
 
QUOTIENT_API SslExpected< QByteArray > aesCtr256Decrypt (const QByteArray &ciphertext, byte_view_t< Aes256KeySize > key, byte_view_t< AesBlockSize > iv)
 Decrypt data using AES-CTR-256.
 
QUOTIENT_API std::vector< byte_tbase58Decode (const QByteArray &encoded)
 
QUOTIENT_API QByteArray sign (const QByteArray &key, const QByteArray &data)
 
bool isSupportedAlgorithm (const QString &algorithm)
 
QUOTIENT_API QByteArray byteArrayForOlm (size_t bufferSize)
 Initialise a buffer object for use with Olm calls.
 
size_t unsignedSize (const auto &buffer)
 Get a size of a container coerced to size_t.
 
template<size_t N = std::dynamic_extent>
auto asCBytes (const auto &buf)
 Obtain a std::span<const byte_t, N> looking into the passed buffer.
 
template<size_t N = std::dynamic_extent>
auto asWritableCBytes (auto &buf)
 Obtain a std::span<byte_t, N> looking into the passed buffer.
 
auto viewAsByteArray (const auto &aRange) -> auto
 
auto getRandom (size_t bytes)
 
template<size_t SizeN>
auto getRandom ()
 
QUOTIENT_API void fillFromSecureRng (std::span< byte_t > bytes)
 Fill the buffer with the securely generated random bytes.
 
QUOTIENT_API bool verifyIdentitySignature (const DeviceKeys &deviceKeys, const QString &deviceId, const QString &userId)
 
QUOTIENT_API bool ed25519VerifySignature (const QString &signingKey, const QJsonObject &obj, const QString &signature)
 checks if the signature is signed by the signing_key
 
QDebugoperator<< (QDebug &d, const TimelineItem &ti)
 
std::partial_ordering operator<=> (const Tag &lhs, const Tag &rhs)
 
bool operator== (const Tag &lhs, const Tag &rhs)
 
 DEFINE_SIMPLE_EVENT (ReadMarkerEvent, Event, "m.fully_read", QString, eventId, "event_id") DEFINE_SIMPLE_EVENT(IgnoredUsersEvent
 
template<EventClass EventT>
bool is (const Event &e)
 
bool operator== (const AbstractEventMetaType &lhs, const AbstractEventMetaType &rhs)
 
template<EventClass EventT, typename... ArgTs>
event_ptr_tt< EventTmakeEvent (ArgTs &&... args)
 Create an event of arbitrary type from its arguments.
 
template<EventClass EventT>
constexpr const automostSpecificMetaType ()
 
template<EventClass EventT>
event_ptr_tt< EventTloadEvent (const QJsonObject &fullJson)
 Create an event with proper type from a JSON object.
 
template<EventClass EventT>
event_ptr_tt< EventTloadEvent (const QString &matrixType, const auto &... otherBasicJsonParams)
 Create an event from a type string and content JSON.
 
template<EventClass EventT, typename BasePtrT >
auto eventCast (const BasePtrT &eptr) -> decltype(static_cast< EventT * >(std::to_address(eptr)))
 Cast the event pointer down in a type-safe way.
 
template<EventClass EventT, typename BaseEventT >
auto eventCast (event_ptr_tt< BaseEventT > &&eptr)
 Cast the event pointer down in a type-safe way, with moving.
 
template<EventClass BaseT, typename TailT >
auto switchOnType (const BaseT &event, TailT &&tail)
 
template<typename FnT1 , typename... FnTs>
auto switchOnType (const EventClass auto &event, FnT1 &&fn1, FnTs &&... fns)
 
QUOTIENT_API std::pair< EncryptedFileMetadata, QByteArray > encryptFile (const QByteArray &plainText)
 
QUOTIENT_API QByteArray decryptFile (const QByteArray &ciphertext, const EncryptedFileMetadata &metadata)
 
QUOTIENT_API QUrl getUrlFromSourceInfo (const FileSourceInfo &fsi)
 
QUOTIENT_API void setUrlInSourceInfo (FileSourceInfo &fsi, const QUrl &newUrl)
 
template<>
void fillJson (QJsonObject &, const FileSourceInfo &)=delete
 
QUOTIENT_API void fillJson (QJsonObject &jo, const FileSourceInfoKeys &jsonKeys, const FileSourceInfo &fsi)
 Export FileSourceInfo to a JSON object.
 
QUOTIENT_API FileSourceInfo fileSourceInfoFromJson (const QJsonObject &jo, const FileSourceInfoKeys &jsonKeys)
 
template<>
QUOTIENT_API EventsWithReceipts fromJson (const QJsonObject &json)
 
QUOTIENT_API QJsonObject toJson (const EventsWithReceipts &ewrs)
 
template<>
EventContent::AliasesEventContent fromJson (const QJsonObject &jo)
 
template<>
auto toJson (const EventContent::AliasesEventContent &c)
 
QUOTIENT_API bool isStateEvent (const QString &eventTypeId)
 Determine whether a given event type is that of a state event.
 
template<>
QUOTIENT_API bool RoomMessageEvent::has< EventContent::TextContent > () const
 
template<>
QUOTIENT_API bool RoomMessageEvent::has< EventContent::LocationContent > () const
 
template<>
QUOTIENT_API bool RoomMessageEvent::has< EventContent::FileContentBase > () const
 
template<>
QUOTIENT_API bool RoomMessageEvent::has< EventContent::FileContent > () const
 
template<>
QUOTIENT_API bool RoomMessageEvent::has< EventContent::ImageContent > () const
 
template<>
QUOTIENT_API bool RoomMessageEvent::has< EventContent::AudioContent > () const
 
template<>
QUOTIENT_API bool RoomMessageEvent::has< EventContent::VideoContent > () const
 
 DEFINE_SIMPLE_STATE_EVENT (RoomTopicEvent, "m.room.topic", QString, topic, "topic") DEFINE_SIMPLE_STATE_EVENT(RoomPinnedEventsEvent
 
QUOTIENT_API QDebug operator<< (QDebug dbg, const EventStats &es)
 
bool QUOTIENT_API isJobPending (BaseJob *job)
 
template<std::derived_from< BaseJob > JobT>
requires requires { doCollectResponse<JobT>(job); }
auto collectResponse (JobT *job)
 Get a job response in a single structure.
 
template<std::derived_from< BaseJob > JobT>
 JobHandle (JobT *) -> JobHandle< JobT >
 
auto collectResponse (const MediaThumbnailJob *j)
 
template<typename SmartSlotT >
auto connectUntil (auto *sender, auto signal, QObject *context, SmartSlotT &&smartSlot, Qt::ConnectionType connType=Qt::AutoConnection)
 Create a connection that self-disconnects when its slot returns true.
 
template<typename ContextT , typename SlotT >
auto connectSingleShot (auto *sender, auto signal, ContextT *context, SlotT slot, Qt::ConnectionType connType=Qt::AutoConnection)
 Create a connection that self-disconnects after triggering on the signal.
 
template<typename RangeT , typename ValT , typename ProjT = std::identity>
requires std::indirectly_comparable<std::ranges::iterator_t<RangeT>, const ValT*, std::ranges::equal_to, ProjT>
auto findIndex (const RangeT &range, const ValT &value, ProjT proj={})
 An indexOf() alternative for any range.
 
template<class TargetT , typename SourceT >
constexpr auto rangeTo (SourceT &&sourceRange)
 A replacement of std::ranges::to() while toolchains catch up.
 
void swap (ReadReceipt &lhs, ReadReceipt &rhs)
 
template<template< class > class ContT>
ContT< RoomMember >::size_type lowerBoundMemberIndex (const ContT< RoomMember > &c, const auto &v, MemberSorter ms={})
 
template<template< class > class ContT>
ContT< QString >::size_type lowerBoundMemberIndex (const ContT< QString > &c, const auto &v, const Room *r, MemberSorter ms={})
 
auto memberMatcher (auto substr, Qt::CaseSensitivity cs=Qt::CaseSensitive)
 A factory to get a functional object matching room members against a substring.
 
QUOTIENT_API QDebug operator<< (QDebug dbg, const RoomSummary &rs)
 
QDebug operator<< (QDebug dhg, const DevicesList &devicesList)
 
QUOTIENT_API UriResolveResult visitResource (Connection *account, const Uri &uri, std::function< UriResolveResult(User *, QString)> userHandler, std::function< void(Room *, QString)> roomEventHandler, std::function< void(Connection *, QString, QStringList)> joinHandler, std::function< bool(const QUrl &)> nonMatrixHandler)
 Resolve the resource and invoke an action on it, via function objects.
 
UriResolveResult checkResource (Connection *account, const Uri &uri)
 Check that the resource is resolvable with no action on it.
 
bool alarmX (bool alarmCondition, const auto &msg, std::source_location loc=std::source_location::current())
 
auto makeReadyVoidFuture ()
 A substitute for QtFuture::makeReadyVoidFuture() for compatibility with Qt pre-6.6.
 
template<typename T >
auto makeReadyValueFuture (T &&value)
 A substitute for QtFuture::makeReadyValueFuture() for compatibility with Qt pre-6.6.
 
constexpr auto operator""_ls (const char *s, std::size_t size)
 
 QT_IGNORE_DEPRECATIONS (template< typename U > asKeyValueRange(U &) -> asKeyValueRange< U & >;template< typename U > asKeyValueRange(U &&) -> asKeyValueRange< U >;) template< typename InputIt
 
Pred std::pair< InputIt, ForwardItfindFirstOf (InputIt first, InputIt last, ForwardIt sFirst, ForwardIt sLast, Pred pred)
 
template<typename ImplType , typename TypeToDelete = ImplType, typename... ArgTs>
ImplPtr< ImplType, TypeToDeletemakeImpl (ArgTs &&... args)
 make_unique for ImplPtr
 
template<typename ImplType , typename TypeToDelete = ImplType>
ImplPtr< ImplType, TypeToDeleteacquireImpl (ImplType *from)
 
template<typename ImplType , typename TypeToDelete = ImplType>
constexpr ImplPtr< ImplType, TypeToDeleteZeroImpl ()
 
template<typename T >
auto makeCStruct (T *(*constructor)(void *), size_t(*sizeFn)(), auto destructor)
 Create a C structure with pre-programmed deletion logic.
 
template<typename... FunctorTs>
 Overloads (FunctorTs &&...) -> Overloads< FunctorTs... >
 
QUOTIENT_API void linkifyUrls (QString &htmlEscapedText)
 
QUOTIENT_API QString sanitized (const QString &plainText)
 
QUOTIENT_API QString prettyPrint (const QString &plainText)
 
QUOTIENT_API QString cacheLocation (QStringView dirName)
 
QUOTIENT_API qreal stringToHueF (const QString &s)
 
QUOTIENT_API QString serverPart (const QString &mxId)
 
QUOTIENT_API QString versionString ()
 
QUOTIENT_API int majorVersion ()
 
QUOTIENT_API int minorVersion ()
 
QUOTIENT_API int patchVersion ()
 
QDebug formatJson (QDebug dbg)
 QDebug manipulator to setup the stream for JSON output.
 
QDebug terse (QDebug dbg)
 Suppress full qualification of enums/QFlags when logging.
 
template<typename FnT >
auto lift (FnT &&fn, auto &&... args)
 Lift an operation into dereferenceable types (std::optional or pointers)
 
template<typename T1 , typename T2 >
requires std::is_assignable_v<T1&, const T2&>
constexpr bool merge (T1 &lhs, const std::optional< T2 > &rhs)
 Merge the value from an optional.
 
template<typename StructT >
constexpr size_t mergeStruct (StructT &lhs, const StructT &rhs, const auto... fields)
 Merge structure-like types.
 
QUOTIENT_API bool isGuestUserId (const UserId &uId)
 

Variables

constexpr bool IfNotEmpty = false
 
template<std::derived_from< GetWhoIsJob > JobT>
constexpr auto doCollectResponse< JobT >
 
constexpr auto DefaultPbkdf2KeyLength = 32u
 
constexpr auto Aes256KeySize = 32u
 
constexpr auto AesBlockSize = 16u
 
constexpr auto HmacKeySize = 32u
 
constexpr auto AlgorithmKeyL = "algorithm"_L1
 
constexpr auto RotationPeriodMsKeyL = "rotation_period_ms"_L1
 
constexpr auto RotationPeriodMsgsKeyL = "rotation_period_msgs"_L1
 
constexpr auto AlgorithmKey = "algorithm"_L1
 
constexpr auto RotationPeriodMsKey = "rotation_period_ms"_L1
 
constexpr auto RotationPeriodMsgsKey = "rotation_period_msgs"_L1
 
constexpr auto Ed25519Key = "ed25519"_L1
 
constexpr auto Curve25519Key = "curve25519"_L1
 
constexpr auto SignedCurve25519Key = "signed_curve25519"_L1
 
constexpr auto OlmV1Curve25519AesSha2AlgoKey = "m.olm.v1.curve25519-aes-sha2"_L1
 
constexpr auto MegolmV1AesSha2AlgoKey = "m.megolm.v1.aes-sha2"_L1
 
constexpr std::array SupportedAlgorithms
 
constexpr auto FavouriteTag = "m.favourite"_L1
 
constexpr auto LowPriorityTag = "m.lowpriority"_L1
 
constexpr auto ServerNoticeTag = "m.server_notice"_L1
 
 Event
 
m ignored_user_list
 
m QSet< QString >
 
m ignoredUsers
 
constexpr auto CiphertextKey = "ciphertext"_L1
 
constexpr auto SenderKeyKey = "sender_key"_L1
 
constexpr auto DeviceIdKey = "device_id"_L1
 
constexpr auto SessionIdKey = "session_id"_L1
 
constexpr auto TypeKey = "type"_L1
 
constexpr auto ContentKey = "content"_L1
 
constexpr auto SenderKey = "sender"_L1
 
constexpr auto UnsignedKey = "unsigned"_L1
 
constexpr auto BodyKey = "body"_L1
 
constexpr auto FormatKey = "format"_L1
 
constexpr auto FormattedBodyKey = "formatted_body"_L1
 
constexpr auto HtmlContentTypeId = "org.matrix.custom.html"_L1
 
constexpr auto InfoKey = "info"_L1
 
constexpr auto RelatesToKey = "m.relates_to"_L1
 
constexpr auto RelTypeKey = "rel_type"_L1
 
constexpr auto IsFallingBackKey = "is_falling_back"_L1
 
constexpr auto SasV1Method = "m.sas.v1"_L1
 
constexpr auto HmacSha256Code = "hkdf-hmac-sha256"_L1
 
constexpr auto HmacSha256V2Code = "hkdf-hmac-sha256.v2"_L1
 
constexpr std::array SupportedMacs { HmacSha256Code, HmacSha256V2Code }
 
constexpr auto EventIdKey = "event_id"_L1
 
constexpr auto RoomIdKey = "room_id"_L1
 
constexpr auto StateKeyKey = "state_key"_L1
 
constexpr auto RedactedCauseKey = "redacted_because"_L1
 
m room pinned_events
 
m room QStringList
 
m room pinnedEvents
 
constexpr auto PrevContentKey = "prev_content"_L1
 
template<typename FnT >
constexpr auto fn_arg_count_v
 
template<typename JobT >
constexpr auto doCollectResponse = nullptr
 
constexpr auto none = std::nullopt
 
constexpr std::array MembershipStrings
 
constexpr std::array JoinStateStrings
 
constexpr std::array RoomTypeStrings { "m.space"_L1 }
 
constexpr auto UnreadNotificationsKey = "unread_notifications"_L1
 
constexpr auto PartiallyReadCountKey = "x-quotient.since_fully_read_count"_L1
 
constexpr auto NewUnreadCountKey = "org.matrix.msc2654.unread_count"_L1
 
constexpr auto HighlightCountKey = "highlight_count"_L1
 
 ForwardIt
 
constexpr qint64 ProfilerMinNsecs
 

Typedef Documentation

◆ byte_span_t

template<size_t N = std::dynamic_extent>
using Quotient::byte_span_t = typedef std::span<byte_t, N>

Definition at line 93 of file e2ee_common.h.

◆ byte_t

Definition at line 87 of file e2ee_common.h.

◆ byte_view_t

template<size_t N = std::dynamic_extent>
using Quotient::byte_view_t = typedef std::span<const byte_t, N>

Definition at line 90 of file e2ee_common.h.

◆ CStructPtr

template<typename T >
using Quotient::CStructPtr = typedef std::unique_ptr<T, CStructDeleter<T> >

An owning pointer to a C structure.

This is intented to ease lifecycle management of Olm structures.

See also
makeCStruct

Definition at line 309 of file util.h.

◆ DeleteLater

Common custom deleter for std::unique_ptr and QScopedPointer.

Since Qt 6, this is merely an alias for QScopedPointerDeleteLater (which is suitable for std::unique_ptr too).

Definition at line 238 of file util.h.

◆ DirectChatsMap

◆ event_ptr_tt

template<typename EventT >
using Quotient::event_ptr_tt = typedef std::unique_ptr<EventT>

Definition at line 17 of file event.h.

◆ event_type_t

◆ EventId

Definition at line 482 of file util.h.

◆ EventPtr

Definition at line 350 of file event.h.

◆ Events

Definition at line 354 of file event.h.

◆ EventsArray

template<EventClass EventT>
using Quotient::EventsArray = typedef std::vector<event_ptr_tt<EventT> >

Definition at line 353 of file event.h.

◆ EventsWithReceipts

◆ FileSourceInfo

Definition at line 70 of file filesourceinfo.h.

◆ FileSourceInfoKeys

Definition at line 72 of file filesourceinfo.h.

◆ fn_arg_t

template<typename FnT , int ArgN = 0>
using Quotient::fn_arg_t = typedef std::tuple_element_t<ArgN, typename function_traits<FnT>::arg_types>

Definition at line 86 of file function_traits.h.

◆ IgnoredUsersList

using Quotient::IgnoredUsersList = typedef IgnoredUsersEvent::value_type

Definition at line 111 of file connection.h.

◆ ImplPtr

template<typename ImplType , typename TypeToDelete = ImplType>
using Quotient::ImplPtr = typedef std::unique_ptr<ImplType, void (*)(TypeToDelete*)>

An owning implementation pointer.

This is basically std::unique_ptr<> to hold your pimpl's but without having to define default constructors/operator=() out of line. Thanks to https://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html for inspiration

Definition at line 250 of file util.h.

◆ key_material_t

template<size_t Size = DefaultPbkdf2KeyLength>
using Quotient::key_material_t = typedef std::array<byte_t, Size>

Definition at line 44 of file cryptoutils.h.

◆ key_view_t

◆ LoginFlow

◆ MessageEventType

◆ Omittable

template<typename T >
using Quotient::Omittable = typedef std::optional<T>

Definition at line 13 of file omittable.h.

◆ OneTimeKeys

Definition at line 355 of file e2ee_common.h.

◆ QObjectHolder

template<std::derived_from< QObject > T>
using Quotient::QObjectHolder = typedef std::unique_ptr<T, DeleteLater>

Definition at line 241 of file util.h.

◆ QOlmExpected

Definition at line 62 of file e2ee_common.h.

◆ QOlmInboundGroupSessionPtr

◆ room_factory_t

Definition at line 82 of file connection.h.

◆ RoomEventPtr

◆ RoomEvents

◆ RoomEventsRange

using Quotient::RoomEventsRange = typedef std::ranges::subrange<RoomEvents::iterator>

Definition at line 94 of file roomevent.h.

◆ RoomId

Definition at line 481 of file util.h.

◆ SslErrorCode

◆ SslExpected

Same as QOlmExpected but for wrapping OpenSSL instead of Olm calls.

Definition at line 55 of file cryptoutils.h.

◆ StateEventKey

A combination of event type and state key uniquely identifies a piece of state in Matrix.

See also
https://matrix.org/docs/spec/client_server/unstable.html#types-of-room-events

Definition at line 58 of file stateevent.h.

◆ StateEventPtr

◆ StateEvents

◆ SyncDataList

Definition at line 81 of file syncdata.h.

◆ TagRecord

Definition at line 15 of file accountdataevents.h.

◆ TagsMap

Definition at line 32 of file accountdataevents.h.

◆ UnorderedMap

template<typename KeyT , typename ValT >
using Quotient::UnorderedMap = typedef std::unordered_map<KeyT, ValT, HashQ<KeyT> >

A wrapper around std::unordered_map compatible with types that have qHash.

Definition at line 125 of file util.h.

◆ user_factory_t

Definition at line 84 of file connection.h.

◆ UserId

Definition at line 480 of file util.h.

Enumeration Type Documentation

◆ EncryptionType

Enumerator
MegolmV1AesSha2 
Undefined 

Definition at line 119 of file quotient_common.h.

◆ HttpVerb

Enumerator
Get 
Put 
Post 
Delete 

Definition at line 24 of file basejob.h.

◆ JoinState

enum class Quotient::JoinState : std::underlying_type_t< Membership >
strong

Local user join-state names.

This represents a subset of Membership values that may arrive as the local user's state grouping for the sync response.

See also
SyncData
Enumerator
Invalid 
Join 
Leave 
Invite 
Knock 

Definition at line 78 of file quotient_common.h.

◆ Membership

Membership states.

These are used for member events. The names here are case-insensitively equal to state names used on the wire.

See also
MemberEventContent, RoomMemberEvent
Enumerator
Invalid 
Join 
Leave 
Invite 
Knock 
Ban 
Undefined 

Definition at line 55 of file quotient_common.h.

◆ RoomType

Enumerator
Space 
Undefined 

Definition at line 111 of file quotient_common.h.

◆ RunningPolicy

Network job running policy flags.

So far only background/foreground flags are available.

See also
Connection::callApi, Connection::run
Enumerator
ForegroundRequest 
BackgroundRequest 

Definition at line 96 of file quotient_common.h.

◆ SslErrorCodes

Enumerator
SslErrorUserOffset 
WrongDerivedKeyLength 
SslPayloadTooLong 

Definition at line 47 of file cryptoutils.h.

◆ UriResolveResult

The result of URI resolution using UriResolver.

See also
UriResolver
Enumerator
StillResolving 
UriResolved 
CouldNotResolve 
IncorrectAction 
InvalidUri 
NoAccount 

Definition at line 101 of file quotient_common.h.

Function Documentation

◆ acquireImpl()

template<typename ImplType , typename TypeToDelete = ImplType>
ImplPtr< ImplType, TypeToDelete > Quotient::acquireImpl ( ImplType from)
inline

Definition at line 280 of file util.h.

◆ addParam()

template<bool Force = true, typename ContT , typename KeyT , typename ValT >
void Quotient::addParam ( ContT container,
KeyT &&  key,
ValT &&  value 
)
inline

Add a key-value pair to QJsonObject or QUrlQuery

Adds a key-value pair(s) specified by key and value to container, optionally (in case IfNotEmpty is passed for the first template parameter) taking into account the value "emptiness". With IfNotEmpty, value is NOT added to the container if and only if:

  • it has a method isEmpty() and value.isEmpty() == true, or
  • it's an optional that has no value (nullopt).

If container is a QUrlQuery, an attempt to fit value into it is made as follows:

  • if value is a QJsonObject, key is ignored and pairs from value are copied to container, assuming that the value in each pair is a string;
  • if value is a QStringList, it is "exploded" into a list of key-value pairs with key equal to key and value taken from each list item;
  • if value is a bool, its OpenAPI (i.e. JSON) representation is added to the query (true or false, respectively).
Template Parameters
Forceadd the pair even if the value is empty. This is true by default; passing IfNotEmpty or false for this parameter enables emptiness checks as described above

Definition at line 555 of file converters.h.

◆ aesCtr256Decrypt()

QUOTIENT_API SslExpected< QByteArray > Quotient::aesCtr256Decrypt ( const QByteArray &  ciphertext,
byte_view_t< Aes256KeySize key,
byte_view_t< AesBlockSize iv 
)

Decrypt data using AES-CTR-256.

key and iv have a length of 32 bytes

◆ aesCtr256Encrypt()

QUOTIENT_API SslExpected< QByteArray > Quotient::aesCtr256Encrypt ( const QByteArray &  plaintext,
byte_view_t< Aes256KeySize key,
byte_view_t< AesBlockSize iv 
)

Encrypt data using AES-CTR-256.

key and iv have a length of 32 bytes

◆ alarmX()

bool Quotient::alarmX ( bool  alarmCondition,
const auto msg,
std::source_location  loc = std::source_location::current() 
)
inline

Definition at line 65 of file util.h.

◆ asCBytes()

template<size_t N = std::dynamic_extent>
auto Quotient::asCBytes ( const auto buf)
inline

Obtain a std::span<const byte_t, N> looking into the passed buffer.

This function returns an adaptor object that is suitable for OpenSSL/Olm invocations (via std::span<>::data() accessor) so that you don't have to wrap your containers into reinterpret/bit_casts on every OpenSSL call.

Note
The caller is responsible for making sure that bytes.size() is small enough to fit into an int (OpenSSL only handles int sizes atm) but also large enough to have at least N bytes if N is not std::dynamic_extent
See also
asWritableCBytes for the case when you need to pass a buffer for writing

Definition at line 122 of file e2ee_common.h.

◆ asWritableCBytes()

template<size_t N = std::dynamic_extent>
auto Quotient::asWritableCBytes ( auto buf)
inline

Obtain a std::span<byte_t, N> looking into the passed buffer.

Definition at line 129 of file e2ee_common.h.

◆ base58Decode()

QUOTIENT_API std::vector< byte_t > Quotient::base58Decode ( const QByteArray &  encoded)

◆ byteArrayForOlm()

QUOTIENT_API QByteArray Quotient::byteArrayForOlm ( size_t  bufferSize)

Initialise a buffer object for use with Olm calls.

Qt and Olm use different size types; this causes the warning noise

◆ cacheLocation()

QUOTIENT_API QString Quotient::cacheLocation ( QStringView  dirName)

Return a path to cache directory after making sure that it exists

The returned path has a trailing slash, clients don't need to append it.

Parameters
dirNamepath to cache directory relative to the standard cache path

◆ checkResource()

UriResolveResult Quotient::checkResource ( Connection account,
const Uri uri 
)
inline

Check that the resource is resolvable with no action on it.

Definition at line 116 of file uriresolver.h.

◆ collectResponse() [1/67]

auto Quotient::collectResponse ( const CheckUsernameAvailabilityJob job)
inline

Definition at line 425 of file registration.h.

◆ collectResponse() [2/67]

auto Quotient::collectResponse ( const CreateRoomJob job)
inline

Definition at line 183 of file create_room.h.

◆ collectResponse() [3/67]

auto Quotient::collectResponse ( const DeactivateAccountJob job)
inline

Definition at line 387 of file registration.h.

◆ collectResponse() [4/67]

auto Quotient::collectResponse ( const DefineFilterJob job)
inline

Definition at line 35 of file filter.h.

◆ collectResponse() [5/67]

auto Quotient::collectResponse ( const Delete3pidFromAccountJob job)
inline

Definition at line 240 of file administrative_contact.h.

◆ collectResponse() [6/67]

auto Quotient::collectResponse ( const GetAccount3PIDsJob job)
inline

Definition at line 62 of file administrative_contact.h.

◆ collectResponse() [7/67]

auto Quotient::collectResponse ( const GetAccountDataJob job)
inline

Definition at line 59 of file account-data.h.

◆ collectResponse() [8/67]

auto Quotient::collectResponse ( const GetAccountDataPerRoomJob job)
inline

Definition at line 117 of file account-data.h.

◆ collectResponse() [9/67]

auto Quotient::collectResponse ( const GetAvatarUrlJob job)
inline

Definition at line 85 of file profile.h.

◆ collectResponse() [10/67]

auto Quotient::collectResponse ( const GetCapabilitiesJob job)
inline

Definition at line 88 of file capabilities.h.

◆ collectResponse() [11/67]

auto Quotient::collectResponse ( const GetConfigAuthedJob job)
inline

Definition at line 354 of file authed-content-repo.h.

◆ collectResponse() [12/67]

QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED auto Quotient::collectResponse ( const GetConfigJob job)
inline

Definition at line 528 of file content-repo.h.

◆ collectResponse() [13/67]

auto Quotient::collectResponse ( const GetDeviceJob job)
inline

Definition at line 54 of file device_management.h.

◆ collectResponse() [14/67]

auto Quotient::collectResponse ( const GetDevicesJob job)
inline

Definition at line 31 of file device_management.h.

◆ collectResponse() [15/67]

auto Quotient::collectResponse ( const GetDisplayNameJob job)
inline

Definition at line 46 of file profile.h.

◆ collectResponse() [16/67]

auto Quotient::collectResponse ( const GetFilterJob job)
inline

Definition at line 60 of file filter.h.

◆ collectResponse() [17/67]

auto Quotient::collectResponse ( const GetJoinedMembersByRoomJob job)
inline

Definition at line 178 of file rooms.h.

◆ collectResponse() [18/67]

auto Quotient::collectResponse ( const GetJoinedRoomsJob job)
inline

Definition at line 28 of file list_joined_rooms.h.

◆ collectResponse() [19/67]

auto Quotient::collectResponse ( const GetLocalAliasesJob job)
inline

Definition at line 125 of file directory.h.

◆ collectResponse() [20/67]

auto Quotient::collectResponse ( const GetLoginFlowsJob job)
inline

Definition at line 50 of file login.h.

◆ collectResponse() [21/67]

auto Quotient::collectResponse ( const GetProtocolMetadataJob job)
inline

Definition at line 60 of file third_party_lookup.h.

◆ collectResponse() [22/67]

auto Quotient::collectResponse ( const GetProtocolsJob job)
inline

Definition at line 37 of file third_party_lookup.h.

◆ collectResponse() [23/67]

auto Quotient::collectResponse ( const GetPushersJob job)
inline

Definition at line 79 of file pusher.h.

◆ collectResponse() [24/67]

auto Quotient::collectResponse ( const GetPushRuleActionsJob job)
inline

Definition at line 226 of file pushrules.h.

◆ collectResponse() [25/67]

auto Quotient::collectResponse ( const GetPushRuleJob job)
inline

Definition at line 82 of file pushrules.h.

◆ collectResponse() [26/67]

auto Quotient::collectResponse ( const GetPushRulesGlobalJob job)
inline

Definition at line 54 of file pushrules.h.

◆ collectResponse() [27/67]

auto Quotient::collectResponse ( const GetPushRulesJob job)
inline

Definition at line 33 of file pushrules.h.

◆ collectResponse() [28/67]

auto Quotient::collectResponse ( const GetRoomKeyBySessionIdJob job)
inline

Definition at line 285 of file key_backup.h.

◆ collectResponse() [29/67]

auto Quotient::collectResponse ( const GetRoomKeysByRoomIdJob job)
inline

Definition at line 398 of file key_backup.h.

◆ collectResponse() [30/67]

auto Quotient::collectResponse ( const GetRoomKeysJob job)
inline

Definition at line 501 of file key_backup.h.

◆ collectResponse() [31/67]

auto Quotient::collectResponse ( const GetRoomStateWithKeyJob job)
inline

Definition at line 72 of file rooms.h.

◆ collectResponse() [32/67]

auto Quotient::collectResponse ( const GetRoomTagsJob job)
inline

Definition at line 36 of file tags.h.

◆ collectResponse() [33/67]

auto Quotient::collectResponse ( const GetRoomVisibilityOnDirectoryJob job)
inline

Definition at line 32 of file list_public_rooms.h.

◆ collectResponse() [34/67]

auto Quotient::collectResponse ( const GetTurnServerJob job)
inline

Definition at line 29 of file voip.h.

◆ collectResponse() [35/67]

auto Quotient::collectResponse ( const GetWellknownJob job)
inline

Definition at line 37 of file wellknown.h.

◆ collectResponse() [36/67]

auto Quotient::collectResponse ( const IsPushRuleEnabledJob job)
inline

Definition at line 183 of file pushrules.h.

◆ collectResponse() [37/67]

auto Quotient::collectResponse ( const JoinRoomByIdJob job)
inline

Definition at line 47 of file joining.h.

◆ collectResponse() [38/67]

auto Quotient::collectResponse ( const JoinRoomJob job)
inline

Definition at line 93 of file joining.h.

◆ collectResponse() [39/67]

auto Quotient::collectResponse ( const KnockRoomJob job)
inline

Definition at line 51 of file knocking.h.

◆ collectResponse() [40/67]

auto Quotient::collectResponse ( const MediaThumbnailJob j)
inline

Definition at line 39 of file mediathumbnailjob.h.

◆ collectResponse() [41/67]

QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED auto Quotient::collectResponse ( const Post3PIDsJob job)
inline

Definition at line 134 of file administrative_contact.h.

◆ collectResponse() [42/67]

auto Quotient::collectResponse ( const PostRoomKeysVersionJob job)
inline

Definition at line 32 of file key_backup.h.

◆ collectResponse() [43/67]

auto Quotient::collectResponse ( const QueryLocationByAliasJob job)
inline

Definition at line 154 of file third_party_lookup.h.

◆ collectResponse() [44/67]

auto Quotient::collectResponse ( const QueryLocationByProtocolJob job)
inline

Definition at line 98 of file third_party_lookup.h.

◆ collectResponse() [45/67]

auto Quotient::collectResponse ( const QueryUserByIDJob job)
inline

Definition at line 177 of file third_party_lookup.h.

◆ collectResponse() [46/67]

auto Quotient::collectResponse ( const QueryUserByProtocolJob job)
inline

Definition at line 127 of file third_party_lookup.h.

◆ collectResponse() [47/67]

auto Quotient::collectResponse ( const RedactEventJob job)
inline

Definition at line 46 of file redaction.h.

◆ collectResponse() [48/67]

auto Quotient::collectResponse ( const RegistrationTokenValidityJob job)
inline

Definition at line 37 of file registration_tokens.h.

◆ collectResponse() [49/67]

auto Quotient::collectResponse ( const RequestOpenIdTokenJob job)
inline

Definition at line 42 of file openid.h.

◆ collectResponse() [50/67]

auto Quotient::collectResponse ( const RequestTokenTo3PIDEmailJob job)
inline

Definition at line 311 of file administrative_contact.h.

◆ collectResponse() [51/67]

auto Quotient::collectResponse ( const RequestTokenTo3PIDMSISDNJob job)
inline

Definition at line 334 of file administrative_contact.h.

◆ collectResponse() [52/67]

auto Quotient::collectResponse ( const RequestTokenToRegisterEmailJob job)
inline

Definition at line 197 of file registration.h.

◆ collectResponse() [53/67]

auto Quotient::collectResponse ( const RequestTokenToRegisterMSISDNJob job)
inline

Definition at line 218 of file registration.h.

◆ collectResponse() [54/67]

auto Quotient::collectResponse ( const RequestTokenToResetPasswordEmailJob job)
inline

Definition at line 281 of file registration.h.

◆ collectResponse() [55/67]

auto Quotient::collectResponse ( const RequestTokenToResetPasswordMSISDNJob job)
inline

Definition at line 314 of file registration.h.

◆ collectResponse() [56/67]

auto Quotient::collectResponse ( const SearchJob job)
inline

Definition at line 201 of file search.h.

◆ collectResponse() [57/67]

auto Quotient::collectResponse ( const SendMessageJob job)
inline

Definition at line 40 of file room_send.h.

◆ collectResponse() [58/67]

auto Quotient::collectResponse ( const SetRoomStateWithKeyJob job)
inline

Definition at line 49 of file room_state.h.

◆ collectResponse() [59/67]

auto Quotient::collectResponse ( const Unbind3pidFromAccountJob job)
inline

Definition at line 282 of file administrative_contact.h.

◆ collectResponse() [60/67]

auto Quotient::collectResponse ( const UpgradeRoomJob job)
inline

Definition at line 27 of file room_upgrades.h.

◆ collectResponse() [61/67]

auto Quotient::collectResponse ( const UploadContentJob job)
inline

Definition at line 34 of file content-repo.h.

◆ collectResponse() [62/67]

auto Quotient::collectResponse ( const UploadCrossSigningSignaturesJob job)
inline

Definition at line 84 of file cross_signing.h.

◆ collectResponse() [63/67]

auto Quotient::collectResponse ( const UploadKeysJob job)
inline

Definition at line 61 of file keys.h.

◆ collectResponse() [64/67]

auto Quotient::collectResponse ( GetMembersByRoomJob job)
inline

Definition at line 136 of file rooms.h.

◆ collectResponse() [65/67]

auto Quotient::collectResponse ( GetOneRoomEventJob job)
inline

Definition at line 37 of file rooms.h.

◆ collectResponse() [66/67]

auto Quotient::collectResponse ( GetRoomStateJob job)
inline

Definition at line 95 of file rooms.h.

◆ collectResponse() [67/67]

template<std::derived_from< BaseJob > JobT>
requires requires { doCollectResponse<JobT>(job); }
auto Quotient::collectResponse ( JobT *  job)
inline

Get a job response in a single structure.

Use this to get all parts of the job response in a single C++ type, defined by the job class. It can be either an aggregate of individual response parts returned by job accessors, or, if the response is already singular, a type of this response. The default implementation caters to generated jobs, where the code has to be generic enough to work with copyable and movable-only responses. For manually written code, simply overload collectResponse() for the respective job type, with appropriate constness.

Definition at line 482 of file basejob.h.

◆ connectSingleShot()

auto Quotient::connectSingleShot ( auto sender,
auto  signal,
ContextT context,
SlotT  slot,
Qt::ConnectionType  connType = Qt::AutoConnection 
)
inline

Create a connection that self-disconnects after triggering on the signal.

Definition at line 43 of file qt_connection_util.h.

◆ connectUntil()

template<typename SmartSlotT >
auto Quotient::connectUntil ( auto sender,
auto  signal,
QObject *  context,
SmartSlotT &&  smartSlot,
Qt::ConnectionType  connType = Qt::AutoConnection 
)
inline

Create a connection that self-disconnects when its slot returns true.

The "slot" signature accepted by connectUntil() is different from normal Qt slots in that its return value must be bool, not void. Also, as of this writing, connectUntil() doesn't accept member function pointers for slots as QObject::connect or Quotient::connectSingleShot do; if you want to use a member function of the context object you should pass a lambda or bind the context to the member function with std::bind_front before passing it to connectUntil().

Returns
whether the connection should be dropped; false means that the connection remains; upon returning true, the slot is disconnected from the signal.

Definition at line 22 of file qt_connection_util.h.

◆ curve25519AesSha2Decrypt()

QUOTIENT_API QOlmExpected< QByteArray > Quotient::curve25519AesSha2Decrypt ( QByteArray  ciphertext,
const QByteArray &  privateKey,
const QByteArray &  ephemeral,
const QByteArray &  mac 
)

Decrypt the data using Curve25519-AES-Sha256.

Note
ciphertext must be given as base64

◆ curve25519AesSha2Encrypt()

QUOTIENT_API QOlmExpected< Curve25519Encrypted > Quotient::curve25519AesSha2Encrypt ( const QByteArray &  plaintext,
const QByteArray &  publicKey 
)

Encrypt the data using Curve25519-AES-Sha256.

Note
publicKey must be given as base64

◆ decryptFile()

QUOTIENT_API QByteArray Quotient::decryptFile ( const QByteArray &  ciphertext,
const EncryptedFileMetadata metadata 
)

◆ defaultRoomFactory()

template<typename T = Room>
auto Quotient::defaultRoomFactory ( Connection c,
const QString id,
JoinState  js 
)

The default factory to create room objects.

Just a wrapper around operator new.

See also
Connection::setRoomFactory, Connection::setRoomType

Definition at line 91 of file connection.h.

◆ defaultUserFactory()

template<typename T = User>
auto Quotient::defaultUserFactory ( Connection c,
const QString id 
)

The default factory to create user objects.

Just a wrapper around operator new.

See also
Connection::setUserFactory, Connection::setUserType

Definition at line 101 of file connection.h.

◆ DEFINE_SIMPLE_EVENT()

Quotient::DEFINE_SIMPLE_EVENT ( ReadMarkerEvent  ,
Event  ,
"m.fully_read"  ,
QString  ,
eventId  ,
"event_id"   
)

◆ DEFINE_SIMPLE_STATE_EVENT()

Quotient::DEFINE_SIMPLE_STATE_EVENT ( RoomTopicEvent  ,
"m.room.topic"  ,
QString  ,
topic  ,
"topic"   
)

◆ ed25519VerifySignature()

QUOTIENT_API bool Quotient::ed25519VerifySignature ( const QString signingKey,
const QJsonObject obj,
const QString signature 
)

checks if the signature is signed by the signing_key

◆ editSubobject()

void Quotient::editSubobject ( QJsonObject json,
auto  key,
std::invocable< QJsonObject & > auto  visitor 
)
inline

Definition at line 29 of file converters.h.

◆ encryptFile()

QUOTIENT_API std::pair< EncryptedFileMetadata, QByteArray > Quotient::encryptFile ( const QByteArray &  plainText)

◆ enumFromJsonString()

std::optional< EnumT > Quotient::enumFromJsonString ( const QString s,
const EnumStringValuesT enumValues 
)
inline

Facility string-to-enum converter.

This is to simplify enum loading from JSON - just specialise Quotient::fromJson() and call this function from it, passing (aside from the JSON value for the enum - that must be a string, not an int) any iterable container of string'y values (const char*, QLatin1String, etc.) matching respective enum values, 0-based.

See also
enumToJsonString

Definition at line 165 of file converters.h.

◆ enumToJsonString()

QString Quotient::enumToJsonString ( EnumT  v,
const EnumStringValuesT enumValues 
)
inline

Facility enum-to-string converter.

This does the same as enumFromJsonString, the other way around.

Note
The source enumeration must not have gaps in values, or enumValues has to match those gaps (i.e., if the source enumeration is defined as { Value1 = 1, Value2 = 3, Value3 = 5 } then enumValues should be defined as { "", "Value1", "", "Value2", "", "Value3" } (mind the gap at value 0, in particular).
See also
enumFromJsonString

Definition at line 184 of file converters.h.

◆ eventCast() [1/2]

template<EventClass EventT, typename BasePtrT >
auto Quotient::eventCast ( const BasePtrT eptr) -> decltype(static_cast<EventT*>(std::to_address(eptr)))
inline

Cast the event pointer down in a type-safe way.

Checks that the event eptr points to actually is of the requested type and returns a (plain) pointer to the event downcast to that type. eptr can be either "dumb" (BaseEventT*) or "smart" (event_ptr_tt<>). This overload doesn't affect the event ownership - if the original pointer owns the event it must outlive the downcast pointer to keep it from dangling.

Definition at line 518 of file event.h.

◆ eventCast() [2/2]

template<EventClass EventT, typename BaseEventT >
auto Quotient::eventCast ( event_ptr_tt< BaseEventT > &&  eptr)
inline

Cast the event pointer down in a type-safe way, with moving.

Checks that the event eptr points to actually is of the requested type; if (and only if) it is, releases the pointer, downcasts it to the requested event type and returns a new smart pointer wrapping the downcast one. Unlike the non-moving eventCast() overload, this one only accepts a smart pointer, and that smart pointer should be an rvalue (either a temporary, or as a result of std::move()). The ownership, respectively, is transferred to the new pointer; the original smart pointer is reset to nullptr, as is normal for unique_ptr<>::release().

Note
If eptr's event type does not match EventT it retains ownership after calling this overload; if it is a temporary, this normally leads to the event getting deleted along with the end of the temporary's lifetime.

Definition at line 541 of file event.h.

◆ fileSourceInfoFromJson()

QUOTIENT_API FileSourceInfo Quotient::fileSourceInfoFromJson ( const QJsonObject jo,
const FileSourceInfoKeys jsonKeys 
)

◆ fillFromJson()

template<typename T >
void Quotient::fillFromJson ( const QJsonValue jv,
T pod 
)
inline

Definition at line 143 of file converters.h.

◆ fillFromSecureRng()

QUOTIENT_API void Quotient::fillFromSecureRng ( std::span< byte_t bytes)

Fill the buffer with the securely generated random bytes.

You should use this throughout Quotient where pseudo-random generators are not enough (i.e. in crypto cases). Don't use it when proper randomness is not critical; it tries to rely on system entropy that is in (somewhat) limited supply. There's no fancy stuff internally, it's just a way to unify secure RNG usage in Quotient. See the function definition for details if you want/need.

◆ fillJson() [1/3]

template<>
void Quotient::fillJson ( QJsonObject ,
const FileSourceInfo  
)
delete

◆ fillJson() [2/3]

QUOTIENT_API void Quotient::fillJson ( QJsonObject jo,
const FileSourceInfoKeys jsonKeys,
const FileSourceInfo fsi 
)

Export FileSourceInfo to a JSON object.

Depending on what is stored inside FileSourceInfo, this function will insert

  • a key-to-string pair where key is taken from jsonKeys[0] and the string is the URL, if FileSourceInfo stores a QUrl;
  • a key-to-object mapping where key is taken from jsonKeys[1] and the object is the result of converting EncryptedFileMetadata to JSON, if FileSourceInfo stores EncryptedFileMetadata

◆ fillJson() [3/3]

template<typename T >
void Quotient::fillJson ( QJsonObject json,
const T data 
)
inline

Definition at line 119 of file converters.h.

◆ findFirstOf()

Pred std::pair< InputIt, ForwardIt > Quotient::findFirstOf ( InputIt  first,
InputIt  last,
ForwardIt  sFirst,
ForwardIt  sLast,
Pred  pred 
)
inline

Definition at line 222 of file util.h.

◆ findIndex()

template<typename RangeT , typename ValT , typename ProjT = std::identity>
requires std::indirectly_comparable<std::ranges::iterator_t<RangeT>, const ValT*, std::ranges::equal_to, ProjT>
auto Quotient::findIndex ( const RangeT range,
const ValT value,
ProjT  proj = {} 
)
inline

An indexOf() alternative for any range.

Unlike QList::indexOf(), returns range.size() if value is not found

Definition at line 13 of file ranges_extras.h.

◆ flagFromJsonString()

std::optional< FlagT > Quotient::flagFromJsonString ( const QString s,
const FlagStringValuesT flagValues 
)
inline

Facility converter for flags.

This is very similar to enumFromJsonString, except that the target enumeration is assumed to be of a 'flag' kind - i.e. its values must be a power-of-two sequence starting from 1, without gaps, so exactly 1,2,4,8,16 and so on.

Note
Unlike enumFromJsonString, the values start from 1 and not from 0.
This function does not support flag combinations.
See also
QUO_DECLARE_FLAGS, QUO_DECLARE_FLAGS_NS

Definition at line 206 of file converters.h.

◆ flagToJsonString()

QString Quotient::flagToJsonString ( FlagT  v,
const FlagStringValuesT flagValues 
)
inline

Definition at line 217 of file converters.h.

◆ formatJson()

QDebug Quotient::formatJson ( QDebug  dbg)
inline

QDebug manipulator to setup the stream for JSON output.

Originally made to encapsulate the change in QDebug behavior in Qt 5.4 and the respective addition of QDebug::noquote(). Together with the operator<<() helper, the proposed usage is (similar to std:: I/O manipulators): qCDebug(MAIN) << formatJson << json_object; // (QJsonObject etc.)

Definition at line 389 of file util.h.

◆ fromJson() [1/16]

template<typename PodT , typename JsonT >
PodT Quotient::fromJson ( const JsonT json)
inline

Definition at line 125 of file converters.h.

◆ fromJson() [2/16]

template<typename JsonT , typename PodT >
void Quotient::fromJson ( const JsonT json,
PodT pod 
)
inline

Definition at line 137 of file converters.h.

◆ fromJson() [3/16]

template<>
QJsonArray Quotient::fromJson ( const QJsonDocument jd)
inline

Definition at line 260 of file converters.h.

◆ fromJson() [4/16]

template<>
EventContent::AliasesEventContent Quotient::fromJson ( const QJsonObject jo)
inline

Definition at line 18 of file roomcanonicalaliasevent.h.

◆ fromJson() [5/16]

template<>
QUOTIENT_API EventsWithReceipts Quotient::fromJson ( const QJsonObject json)
inline

Definition at line 18 of file roomcanonicalaliasevent.h.

◆ fromJson() [6/16]

template<>
bool Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 231 of file converters.h.

◆ fromJson() [7/16]

template<>
int Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 234 of file converters.h.

◆ fromJson() [8/16]

template<>
double Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 237 of file converters.h.

◆ fromJson() [9/16]

template<>
float Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 240 of file converters.h.

◆ fromJson() [10/16]

template<>
qint64 Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 243 of file converters.h.

◆ fromJson() [11/16]

template<>
QString Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 246 of file converters.h.

◆ fromJson() [12/16]

template<>
QJsonArray Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 257 of file converters.h.

◆ fromJson() [13/16]

template<>
QDateTime Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 267 of file converters.h.

◆ fromJson() [14/16]

template<>
QDate Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 279 of file converters.h.

◆ fromJson() [15/16]

template<>
QVariantHash QUOTIENT_API Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 231 of file converters.h.

◆ fromJson() [16/16]

template<>
QByteArray Quotient::fromJson ( const QJsonValue jv)
inlinedelete

Use fromJson<QString> and then toLatin1()/toUtf8()/... to make QByteArray

QJsonValue can only convert to QString and there's ambiguity whether conversion to QByteArray should use (fast but very limited) toLatin1() or (all encompassing and conforming to the JSON spec but slow) toUtf8().

Definition at line 231 of file converters.h.

◆ getRandom() [1/2]

template<size_t SizeN>
auto Quotient::getRandom ( )
inline

Definition at line 251 of file e2ee_common.h.

◆ getRandom() [2/2]

auto Quotient::getRandom ( size_t  bytes)
inline

Definition at line 245 of file e2ee_common.h.

◆ getUrlFromSourceInfo()

QUOTIENT_API QUrl Quotient::getUrlFromSourceInfo ( const FileSourceInfo fsi)

◆ hkdfSha256()

QUOTIENT_API SslExpected< HkdfKeys > Quotient::hkdfSha256 ( key_view_t  key,
byte_view_t< 32 >  salt,
byte_view_t<>  info 
)

Derive a key from the input data using HKDF-SHA256.

The info parameter should be either 0 or 32 bytes long

◆ hmacSha256()

QUOTIENT_API SslExpected< QByteArray > Quotient::hmacSha256 ( byte_view_t< HmacKeySize hmacKey,
const QByteArray &  data 
)

Calculate a MAC from the given key and data.

◆ is()

template<EventClass EventT>
bool Quotient::is ( const Event e)
inline

Definition at line 492 of file event.h.

◆ isGuestUserId()

QUOTIENT_API bool Quotient::isGuestUserId ( const UserId uId)

◆ isJobPending()

bool QUOTIENT_API Quotient::isJobPending ( BaseJob job)
inline

Definition at line 465 of file basejob.h.

◆ isStateEvent()

QUOTIENT_API bool Quotient::isStateEvent ( const QString eventTypeId)

Determine whether a given event type is that of a state event.

◆ isSupportedAlgorithm()

bool Quotient::isSupportedAlgorithm ( const QString algorithm)
inline

Definition at line 40 of file e2ee_common.h.

◆ JobHandle()

template<std::derived_from< BaseJob > JobT>
Quotient::JobHandle ( JobT *  ) -> JobHandle< JobT >

◆ lift()

template<typename FnT >
auto Quotient::lift ( FnT &&  fn,
auto &&...  args 
)
inline

Lift an operation into dereferenceable types (std::optional or pointers)

This is a more generic version of std::optional::and_then() that accepts an arbitrary number of arguments of any type that is dereferenceable (i.e. unary operator*() can be applied to it) and (explicitly or implicitly) convertible to bool. This allows to streamline checking for nullptr/nullopt before applying the operation on the underlying types. fn is only invoked if all args are "truthy" (i.e. (... && bool(args)) == true).

Parameters
fnA callable that should accept the types stored inside optionals/pointers passed in args (NOT optionals/pointers themselves; they are unwrapped)
Returns
Always an optional: if fn returns another type, lift() wraps it in std::optional; if fn returns std::optional, that return value (or std::nullopt) is returned as is.

Definition at line 437 of file util.h.

◆ linkifyUrls()

QUOTIENT_API void Quotient::linkifyUrls ( QString htmlEscapedText)

Convert what looks like a URL or a Matrix ID to an HTML hyperlink

◆ loadEvent() [1/2]

template<EventClass EventT>
event_ptr_tt< EventT > Quotient::loadEvent ( const QJsonObject fullJson)
inline

Create an event with proper type from a JSON object.

Use this factory template to detect the type from the JSON object contents (the detected event type should derive from the template parameter type) and create an event object of that type.

Definition at line 198 of file event.h.

◆ loadEvent() [2/2]

template<EventClass EventT>
event_ptr_tt< EventT > Quotient::loadEvent ( const QString matrixType,
const auto &...  otherBasicJsonParams 
)
inline

Create an event from a type string and content JSON.

Use this template to resolve the C++ type from the Matrix type string in matrixType and create an event of that type by passing all parameters to EventT::basicJson().

Definition at line 210 of file event.h.

◆ lowerBoundMemberIndex() [1/2]

template<template< class > class ContT>
ContT< QString >::size_type Quotient::lowerBoundMemberIndex ( const ContT< QString > &  c,
const auto v,
const Room r,
MemberSorter  ms = {} 
)
inline

Definition at line 1011 of file room.h.

◆ lowerBoundMemberIndex() [2/2]

template<template< class > class ContT>
ContT< RoomMember >::size_type Quotient::lowerBoundMemberIndex ( const ContT< RoomMember > &  c,
const auto v,
MemberSorter  ms = {} 
)
inline

Definition at line 1003 of file room.h.

◆ majorVersion()

QUOTIENT_API int Quotient::majorVersion ( )

◆ makeCStruct()

template<typename T >
auto Quotient::makeCStruct ( T *(*)(void *)  constructor,
size_t(*)()  sizeFn,
auto  destructor 
)
inline

Create a C structure with pre-programmed deletion logic.

This facility function creates a CStructPtr that owns the pointer returned by constructor. The memory passed to constructor is allocated as an array of bytes; the size of that array is determined by calling sizeFn. Finally, since the returned pointer is owning, it also stores the corresponding CStructDeleter instance; when called at destruction of the owning pointer, this deleter first calls destructor passing the original C pointer returned by constructor; and then deletes the allocated array of bytes.

Definition at line 322 of file util.h.

◆ makeEvent()

template<EventClass EventT, typename... ArgTs>
event_ptr_tt< EventT > Quotient::makeEvent ( ArgTs &&...  args)
inline

Create an event of arbitrary type from its arguments.

This should not be used to load events from JSON - use loadEvent() for that.

See also
loadEvent

Definition at line 178 of file event.h.

◆ makeImpl()

template<typename ImplType , typename TypeToDelete = ImplType, typename... ArgTs>
ImplPtr< ImplType, TypeToDelete > Quotient::makeImpl ( ArgTs &&...  args)
inline

make_unique for ImplPtr

Since std::make_unique is not compatible with ImplPtr, this should be used in constructors of frontend classes to create implementation instances.

Definition at line 271 of file util.h.

◆ makeReadyValueFuture()

template<typename T >
auto Quotient::makeReadyValueFuture ( T &&  value)
inline

A substitute for QtFuture::makeReadyValueFuture() for compatibility with Qt pre-6.6.

Definition at line 105 of file util.h.

◆ makeReadyVoidFuture()

auto Quotient::makeReadyVoidFuture ( )
inline

A substitute for QtFuture::makeReadyVoidFuture() for compatibility with Qt pre-6.6.

Definition at line 94 of file util.h.

◆ memberMatcher()

auto Quotient::memberMatcher ( auto  substr,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
)
inline

A factory to get a functional object matching room members against a substring.

This is a convenience wrapper to use RoomMember::matches() in standard algorithms.

Definition at line 224 of file roommember.h.

◆ merge()

template<typename T1 , typename T2 >
requires std::is_assignable_v<T1&, const T2&>
constexpr bool Quotient::merge ( T1 lhs,
const std::optional< T2 > &  rhs 
)
inlineconstexpr

Merge the value from an optional.

Assigns the value stored at rhs to lhs if, and only if, rhs is not omitted and lhs != *rhs. lhs can be either an optional or an ordinary variable.

Returns
true if rhs is not omitted and the lhs value was different, in other words, if lhs has changed; false otherwise

Definition at line 456 of file util.h.

◆ mergeStruct()

template<typename StructT >
constexpr size_t Quotient::mergeStruct ( StructT lhs,
const StructT rhs,
const auto...  fields 
)
inlineconstexpr

Merge structure-like types.

Merges fields in lhs from counterparts in rhs. The list of fields to merge is passed in additional parameters (fields). E.g.: \codeline mergeStruct(struct1, struct2, &Struct::field1, &Struct::field2, &Struct::field3)

Returns
the number of fields in lhs that were changed

Definition at line 471 of file util.h.

◆ minorVersion()

QUOTIENT_API int Quotient::minorVersion ( )

◆ mostSpecificMetaType()

template<EventClass EventT>
constexpr const auto & Quotient::mostSpecificMetaType ( )
constexpr

Definition at line 184 of file event.h.

◆ operator!=()

bool Quotient::operator!= ( const LoginFlow lhs,
const LoginFlow rhs 
)
inline

Definition at line 75 of file connection.h.

◆ operator""_ls()

constexpr auto Quotient::operator""_ls ( const char s,
std::size_t  size 
)
constexpr

Definition at line 133 of file util.h.

◆ operator<<() [1/4]

QDebug & Quotient::operator<< ( QDebug d,
const TimelineItem ti 
)
inline

Definition at line 156 of file eventitem.h.

◆ operator<<() [2/4]

◆ operator<<() [3/4]

◆ operator<<() [4/4]

QDebug Quotient::operator<< ( QDebug  dhg,
const DevicesList devicesList 
)

◆ operator<=>()

std::partial_ordering Quotient::operator<=> ( const Tag lhs,
const Tag rhs 
)
inline

Definition at line 17 of file accountdataevents.h.

◆ operator==() [1/3]

Definition at line 82 of file event.h.

◆ operator==() [2/3]

bool Quotient::operator== ( const LoginFlow lhs,
const LoginFlow rhs 
)
inline

Definition at line 70 of file connection.h.

◆ operator==() [3/3]

bool Quotient::operator== ( const Tag lhs,
const Tag rhs 
)
inline

Definition at line 27 of file accountdataevents.h.

◆ Overloads()

template<typename... FunctorTs>
Quotient::Overloads ( FunctorTs &&  ...) -> Overloads< FunctorTs... >

◆ patchVersion()

QUOTIENT_API int Quotient::patchVersion ( )

◆ pbkdf2HmacSha512()

template<size_t Size = DefaultPbkdf2KeyLength>
QUOTIENT_API SslExpected< key_material_t< Size > > Quotient::pbkdf2HmacSha512 ( const QByteArray &  passphrase,
const QByteArray &  salt,
int  iterations 
)
inline

Generate a key out of the given passphrase.

Definition at line 71 of file cryptoutils.h.

◆ prettyPrint()

QUOTIENT_API QString Quotient::prettyPrint ( const QString plainText)

Pretty-print plain text into HTML

This includes HTML escaping of <,>,",& and calling linkifyUrls()

◆ QT_IGNORE_DEPRECATIONS()

Quotient::QT_IGNORE_DEPRECATIONS ( template< typename U > asKeyValueRange(U &) -> asKeyValueRange< U & >;template< typename U > asKeyValueRange(U &&) -> asKeyValueRange< U >;  )

A replica of std::find_first_of that returns a pair of iterators

Convenient for cases when you need to know which particular "first of" [sFirst, sLast) has been found in [first, last).

◆ rangeTo()

template<class TargetT , typename SourceT >
constexpr auto Quotient::rangeTo ( SourceT &&  sourceRange)
constexpr

A replacement of std::ranges::to() while toolchains catch up.

An overload that accepts unspecialised container template.

Returns a container of type TargetT created from sourceRange. Unlike std::ranges::to(), you have to pass the range to it (e.g. rangeTo<TargetT>(someRange)); using it in a pipeline (someRange | rangeTo<TargetT>()) won't compile. Internally calls std::ranges::to() if it's available; otherwise, returns the result of calling TargetT(ranges::begin(sourceRange), ranges::end(sourceRange)).

Definition at line 27 of file ranges_extras.h.

◆ replaceSubvalue()

void Quotient::replaceSubvalue ( QJsonObject json,
auto  topLevelKey,
auto  subKey,
QJsonValue  subValue 
)
inline

Definition at line 36 of file converters.h.

◆ RoomMessageEvent::has< EventContent::AudioContent >()

◆ RoomMessageEvent::has< EventContent::FileContent >()

◆ RoomMessageEvent::has< EventContent::FileContentBase >()

◆ RoomMessageEvent::has< EventContent::ImageContent >()

◆ RoomMessageEvent::has< EventContent::LocationContent >()

◆ RoomMessageEvent::has< EventContent::TextContent >()

◆ RoomMessageEvent::has< EventContent::VideoContent >()

◆ sanitized()

QUOTIENT_API QString Quotient::sanitized ( const QString plainText)

Sanitize the text before showing in HTML

This does toHtmlEscaped() and removes Unicode BiDi marks.

◆ serverPart()

QUOTIENT_API QString Quotient::serverPart ( const QString mxId)

Extract the serverpart from MXID

◆ setUrlInSourceInfo()

QUOTIENT_API void Quotient::setUrlInSourceInfo ( FileSourceInfo fsi,
const QUrl &  newUrl 
)

◆ sign()

QUOTIENT_API QByteArray Quotient::sign ( const QByteArray &  key,
const QByteArray &  data 
)

◆ stringToHueF()

QUOTIENT_API qreal Quotient::stringToHueF ( const QString s)

Hue color component of based of the hash of the string.

The implementation is based on XEP-0392: https://xmpp.org/extensions/xep-0392.html Naming and range are the same as QColor's hueF method: https://doc.qt.io/qt-5/qcolor.html#integer-vs-floating-point-precision

◆ swap()

void Quotient::swap ( ReadReceipt lhs,
ReadReceipt rhs 
)
inline

Definition at line 98 of file room.h.

◆ switchOnType() [1/2]

template<EventClass BaseT, typename TailT >
auto Quotient::switchOnType ( const BaseT event,
TailT &&  tail 
)
inline

Definition at line 555 of file event.h.

◆ switchOnType() [2/2]

template<typename FnT1 , typename... FnTs>
auto Quotient::switchOnType ( const EventClass auto event,
FnT1 &&  fn1,
FnTs &&...  fns 
)
inline

Definition at line 570 of file event.h.

◆ terse()

QDebug Quotient::terse ( QDebug  dbg)
inline

Suppress full qualification of enums/QFlags when logging.

Definition at line 392 of file util.h.

◆ toJson() [1/7]

template<>
auto Quotient::toJson ( const EventContent::AliasesEventContent c)
inline

Definition at line 26 of file roomcanonicalaliasevent.h.

◆ toJson() [2/7]

QUOTIENT_API QJsonObject Quotient::toJson ( const EventsWithReceipts ewrs)

◆ toJson() [3/7]

QJsonValue Quotient::toJson ( const QDate val)
inline

Definition at line 277 of file converters.h.

◆ toJson() [4/7]

QJsonValue Quotient::toJson ( const QDateTime val)
inline

Definition at line 262 of file converters.h.

◆ toJson() [5/7]

QJsonObject QUOTIENT_API Quotient::toJson ( const QVariantHash vh)

◆ toJson() [6/7]

template<typename... Ts>
QJsonValue Quotient::toJson ( const std::variant< Ts... > &  v)
inline

Definition at line 307 of file converters.h.

◆ toJson() [7/7]

template<typename T >
auto Quotient::toJson ( const T pod)
inline

Definition at line 108 of file converters.h.

◆ toSnakeCase()

auto Quotient::toSnakeCase ( QLatin1String  s)
inline

Definition at line 564 of file converters.h.

◆ unsignedSize()

size_t Quotient::unsignedSize ( const auto buffer)
inline

Get a size of a container coerced to size_t.

This is mainly aimed at Qt containers because they have signed size; but it can also be called on other containers or even C arrays, e.g. - to spare generic code from special-casing. For Qt containers, it's a safe cast since size_t can always accommodate the range between 0 and SIZE_MAX / 2 - 1 that they support; yet compilers complain...

Definition at line 75 of file e2ee_common.h.

◆ verifyIdentitySignature()

QUOTIENT_API bool Quotient::verifyIdentitySignature ( const DeviceKeys deviceKeys,
const QString deviceId,
const QString userId 
)

◆ versionString()

QUOTIENT_API QString Quotient::versionString ( )

◆ viewAsByteArray()

auto Quotient::viewAsByteArray ( const auto aRange) -> auto
inline

Definition at line 134 of file e2ee_common.h.

◆ visitResource()

QUOTIENT_API UriResolveResult Quotient::visitResource ( Connection account,
const Uri uri,
std::function< UriResolveResult(User *, QString)>  userHandler,
std::function< void(Room *, QString)>  roomEventHandler,
std::function< void(Connection *, QString, QStringList)>  joinHandler,
std::function< bool(const QUrl &)>  nonMatrixHandler 
)

Resolve the resource and invoke an action on it, via function objects.

This function encapsulates the logic of resolving a Matrix identifier or URI into a Quotient object (or objects) and calling an appropriate handler on it. Unlike UriResolverBase it accepts the list of handlers from the caller; internally it's uses a minimal UriResolverBase class

Parameters
accountThe connection used as a context to resolve the identifier
uriA URI that can represent a Matrix entity
userHandlerCalled when the passed URI identifies a Matrix user
roomEventHandlerCalled when the passed URI identifies a room or an event in a room
joinHandlerCalled when the passed URI has action() == "join" and identifies a room that the user defined by the Connection argument is not a member of
nonMatrixHandlerCalled when the passed URI has type() == NonMatrix; should return true if the URI is considered resolved, false otherwise
See also
UriResolverBase, UriDispatcher

◆ zeroedByteArray()

QByteArray Quotient::zeroedByteArray ( QByteArray::size_type  n = 32)
inline

Definition at line 60 of file cryptoutils.h.

◆ zeroes()

template<size_t N, typename T = uint8_t>
consteval std::array< T, N > Quotient::zeroes ( )

Definition at line 62 of file cryptoutils.h.

◆ ZeroImpl()

template<typename ImplType , typename TypeToDelete = ImplType>
constexpr ImplPtr< ImplType, TypeToDelete > Quotient::ZeroImpl ( )
constexpr

Definition at line 288 of file util.h.

Variable Documentation

◆ Aes256KeySize

constexpr auto Quotient::Aes256KeySize = 32u
constexpr

Definition at line 22 of file cryptoutils.h.

◆ AesBlockSize

constexpr auto Quotient::AesBlockSize = 16u
constexpr

Definition at line 23 of file cryptoutils.h.

◆ AlgorithmKey

constexpr auto Quotient::AlgorithmKey = "algorithm"_L1
inlineconstexpr

Definition at line 26 of file e2ee_common.h.

◆ AlgorithmKeyL

constexpr auto Quotient::AlgorithmKeyL = "algorithm"_L1
inlineconstexpr

Definition at line 22 of file e2ee_common.h.

◆ BodyKey

constexpr auto Quotient::BodyKey = "body"_L1
inlineconstexpr

Definition at line 20 of file eventcontent.h.

◆ CiphertextKey

constexpr auto Quotient::CiphertextKey = "ciphertext"_L1
inlineconstexpr

Definition at line 10 of file encryptedevent.h.

◆ ContentKey

constexpr auto Quotient::ContentKey = "content"_L1
inlineconstexpr

Definition at line 22 of file event.h.

◆ Curve25519Key

constexpr auto Quotient::Curve25519Key = "curve25519"_L1
inlineconstexpr

Definition at line 31 of file e2ee_common.h.

◆ DefaultPbkdf2KeyLength

constexpr auto Quotient::DefaultPbkdf2KeyLength = 32u
constexpr

Definition at line 21 of file cryptoutils.h.

◆ DeviceIdKey

constexpr auto Quotient::DeviceIdKey = "device_id"_L1
inlineconstexpr

Definition at line 12 of file encryptedevent.h.

◆ doCollectResponse

template<typename JobT >
constexpr auto Quotient::doCollectResponse = nullptr
inlineconstexpr

Definition at line 471 of file basejob.h.

◆ doCollectResponse< JobT >

template<std::derived_from< GetWhoIsJob > JobT>
constexpr auto Quotient::doCollectResponse< JobT >
inlineconstexpr
Initial value:
=
[](JobT* j) -> GetWhoIsJob::Response { return { j->userId(), j->devices() }; }

Definition at line 74 of file admin.h.

◆ Ed25519Key

constexpr auto Quotient::Ed25519Key = "ed25519"_L1
inlineconstexpr

Definition at line 30 of file e2ee_common.h.

◆ Event

Definition at line 37 of file accountdataevents.h.

◆ EventIdKey

constexpr auto Quotient::EventIdKey = "event_id"_L1
inlineconstexpr

Definition at line 12 of file roomevent.h.

◆ FavouriteTag

constexpr auto Quotient::FavouriteTag = "m.favourite"_L1
inlineconstexpr

Definition at line 11 of file accountdataevents.h.

◆ fn_arg_count_v

template<typename FnT >
constexpr auto Quotient::fn_arg_count_v
constexpr
Initial value:
=
std::tuple_size_v<typename function_traits<FnT>::arg_types>

Definition at line 90 of file function_traits.h.

◆ FormatKey

constexpr auto Quotient::FormatKey = "format"_L1
inlineconstexpr

Definition at line 21 of file eventcontent.h.

◆ FormattedBodyKey

constexpr auto Quotient::FormattedBodyKey = "formatted_body"_L1
inlineconstexpr

Definition at line 22 of file eventcontent.h.

◆ ForwardIt

Quotient::ForwardIt

Definition at line 221 of file util.h.

◆ HighlightCountKey

constexpr auto Quotient::HighlightCountKey = "highlight_count"_L1
inlineconstexpr

Definition at line 15 of file syncdata.h.

◆ HmacKeySize

constexpr auto Quotient::HmacKeySize = 32u
constexpr

Definition at line 24 of file cryptoutils.h.

◆ HmacSha256Code

constexpr auto Quotient::HmacSha256Code = "hkdf-hmac-sha256"_L1
inlineconstexpr

Definition at line 78 of file keyverificationevent.h.

◆ HmacSha256V2Code

constexpr auto Quotient::HmacSha256V2Code = "hkdf-hmac-sha256.v2"_L1
inlineconstexpr

Definition at line 79 of file keyverificationevent.h.

◆ HtmlContentTypeId

constexpr auto Quotient::HtmlContentTypeId = "org.matrix.custom.html"_L1
inlineconstexpr

Definition at line 23 of file eventcontent.h.

◆ IfNotEmpty

constexpr bool Quotient::IfNotEmpty = false
constexpr

Definition at line 456 of file converters.h.

◆ ignored_user_list

m Quotient::ignored_user_list

Definition at line 37 of file accountdataevents.h.

◆ ignoredUsers

m Quotient::ignoredUsers

Definition at line 38 of file accountdataevents.h.

◆ InfoKey

constexpr auto Quotient::InfoKey = "info"_L1
inlineconstexpr

Definition at line 24 of file eventcontent.h.

◆ IsFallingBackKey

constexpr auto Quotient::IsFallingBackKey = "is_falling_back"_L1
inlineconstexpr

Definition at line 12 of file eventrelation.h.

◆ JoinStateStrings

constexpr std::array Quotient::JoinStateStrings
constexpr
Initial value:

Definition at line 87 of file quotient_common.h.

◆ LowPriorityTag

constexpr auto Quotient::LowPriorityTag = "m.lowpriority"_L1
inlineconstexpr

Definition at line 12 of file accountdataevents.h.

◆ MegolmV1AesSha2AlgoKey

constexpr auto Quotient::MegolmV1AesSha2AlgoKey = "m.megolm.v1.aes-sha2"_L1
inlineconstexpr

Definition at line 35 of file e2ee_common.h.

◆ MembershipStrings

constexpr std::array Quotient::MembershipStrings
constexpr
Initial value:
{
"join"_L1, "leave"_L1, "invite"_L1, "knock"_L1, "ban"_L1
}

Definition at line 68 of file quotient_common.h.

◆ NewUnreadCountKey

constexpr auto Quotient::NewUnreadCountKey = "org.matrix.msc2654.unread_count"_L1
inlineconstexpr

Definition at line 14 of file syncdata.h.

◆ none

constexpr auto Quotient::none = std::nullopt
constexpr

Definition at line 16 of file omittable.h.

◆ OlmV1Curve25519AesSha2AlgoKey

constexpr auto Quotient::OlmV1Curve25519AesSha2AlgoKey = "m.olm.v1.curve25519-aes-sha2"_L1
inlineconstexpr

Definition at line 34 of file e2ee_common.h.

◆ PartiallyReadCountKey

constexpr auto Quotient::PartiallyReadCountKey = "x-quotient.since_fully_read_count"_L1
inlineconstexpr

Definition at line 13 of file syncdata.h.

◆ pinned_events

m room Quotient::pinned_events

Definition at line 27 of file simplestateevents.h.

◆ pinnedEvents

m room Quotient::pinnedEvents

Definition at line 28 of file simplestateevents.h.

◆ PrevContentKey

constexpr auto Quotient::PrevContentKey = "prev_content"_L1
inlineconstexpr

Definition at line 10 of file stateevent.h.

◆ ProfilerMinNsecs

constexpr qint64 Quotient::ProfilerMinNsecs
constexpr
Initial value:
=
200
* 1000

Definition at line 397 of file util.h.

◆ QSet< QString >

Definition at line 37 of file accountdataevents.h.

◆ QStringList

m room Quotient::QStringList

Definition at line 28 of file simplestateevents.h.

◆ RedactedCauseKey

constexpr auto Quotient::RedactedCauseKey = "redacted_because"_L1
inlineconstexpr

Definition at line 15 of file roomevent.h.

◆ RelatesToKey

constexpr auto Quotient::RelatesToKey = "m.relates_to"_L1
inlineconstexpr

Definition at line 10 of file eventrelation.h.

◆ RelTypeKey

constexpr auto Quotient::RelTypeKey = "rel_type"_L1
inlineconstexpr

Definition at line 11 of file eventrelation.h.

◆ RoomIdKey

constexpr auto Quotient::RoomIdKey = "room_id"_L1
inlineconstexpr

Definition at line 13 of file roomevent.h.

◆ RoomTypeStrings

constexpr std::array Quotient::RoomTypeStrings { "m.space"_L1 }
constexpr

Definition at line 117 of file quotient_common.h.

◆ RotationPeriodMsgsKey

constexpr auto Quotient::RotationPeriodMsgsKey = "rotation_period_msgs"_L1
inlineconstexpr

Definition at line 28 of file e2ee_common.h.

◆ RotationPeriodMsgsKeyL

constexpr auto Quotient::RotationPeriodMsgsKeyL = "rotation_period_msgs"_L1
inlineconstexpr

Definition at line 24 of file e2ee_common.h.

◆ RotationPeriodMsKey

constexpr auto Quotient::RotationPeriodMsKey = "rotation_period_ms"_L1
inlineconstexpr

Definition at line 27 of file e2ee_common.h.

◆ RotationPeriodMsKeyL

constexpr auto Quotient::RotationPeriodMsKeyL = "rotation_period_ms"_L1
inlineconstexpr

Definition at line 23 of file e2ee_common.h.

◆ SasV1Method

constexpr auto Quotient::SasV1Method = "m.sas.v1"_L1
inlineconstexpr

Definition at line 10 of file keyverificationevent.h.

◆ SenderKey

constexpr auto Quotient::SenderKey = "sender"_L1
inlineconstexpr

Definition at line 23 of file event.h.

◆ SenderKeyKey

constexpr auto Quotient::SenderKeyKey = "sender_key"_L1
inlineconstexpr

Definition at line 11 of file encryptedevent.h.

◆ ServerNoticeTag

constexpr auto Quotient::ServerNoticeTag = "m.server_notice"_L1
inlineconstexpr

Definition at line 13 of file accountdataevents.h.

◆ SessionIdKey

constexpr auto Quotient::SessionIdKey = "session_id"_L1
inlineconstexpr

Definition at line 13 of file encryptedevent.h.

◆ SignedCurve25519Key

constexpr auto Quotient::SignedCurve25519Key = "signed_curve25519"_L1
inlineconstexpr

Definition at line 32 of file e2ee_common.h.

◆ StateKeyKey

constexpr auto Quotient::StateKeyKey = "state_key"_L1
inlineconstexpr

Definition at line 14 of file roomevent.h.

◆ SupportedAlgorithms

constexpr std::array Quotient::SupportedAlgorithms
constexpr
Initial value:
constexpr auto OlmV1Curve25519AesSha2AlgoKey
Definition e2ee_common.h:34
constexpr auto MegolmV1AesSha2AlgoKey
Definition e2ee_common.h:35

Definition at line 37 of file e2ee_common.h.

◆ SupportedMacs

constexpr std::array Quotient::SupportedMacs { HmacSha256Code, HmacSha256V2Code }
constexpr

Definition at line 80 of file keyverificationevent.h.

◆ TypeKey

constexpr auto Quotient::TypeKey = "type"_L1
inlineconstexpr

Definition at line 21 of file event.h.

◆ UnreadNotificationsKey

constexpr auto Quotient::UnreadNotificationsKey = "unread_notifications"_L1
inlineconstexpr

Definition at line 12 of file syncdata.h.

◆ UnsignedKey

constexpr auto Quotient::UnsignedKey = "unsigned"_L1
inlineconstexpr

Definition at line 24 of file event.h.