Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtOhosAppKit::WantInfo Class Referenceabstract

\variable QtOhosAppKit::Want::deviceId More...

#include <qohoswant_p.h>

Collaboration diagram for QtOhosAppKit::WantInfo:

Classes

class  ContactInfo
 The ContactInfo struct represents contact information extracted from a Want. More...

Public Types

enum class  LaunchReason {
  Unknown , StartAbility , Continuation , PrepareContinuation ,
  Preload
}

Public Member Functions

virtual ~WantInfo ()
virtual Want want () const =0
 Return associated with this instance Want object.
virtual std::optional< QList< std::shared_ptr< ShareKit::SharedRecord > > > tryGetSharedRecordsFromShareKit () const =0
virtual std::optional< ContactInfotryGetContactInfo () const =0
 Tries to get contact information from the associated Want.
virtual LaunchReason launchReason () const =0

Protected Member Functions

 WantInfo ()

Detailed Description

\variable QtOhosAppKit::Want::deviceId

Represents the device Id on which Ability is to be performed. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Device Id}.

\variable QtOhosAppKit::Want::bundleName

Represents an application bundle name. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Bundle Name}.

\variable QtOhosAppKit::Want::moduleName

Represents the module name. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Module Name}.

\variable QtOhosAppKit::Want::abilityName

Represents the name of Ability to be started. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Ability Name}.

\variable QtOhosAppKit::Want::uri

Represents the type of pending data. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Uri}.

\variable QtOhosAppKit::Want::type

Represents the MIME type of the file to open for example 'text/xml', 'image/ * ', etc. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Type}.

\variable QtOhosAppKit::Want::action

Represents the general operations to be performed, for example: viewing, sharing, application details. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Action}.

\variable QtOhosAppKit::Want::entities

Represents the additional category information of the target Ability for example: browser, video player. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Entities}.

\variable QtOhosAppKit::Want::flags

Represents the way to deal with Want. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Flags}.

See also
WantFlag

\variable QtOhosAppKit::Want::parameters

Represents the list of parameters in the Want object. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references-V5/js-apis-app-ability-want-V5} {Parameters}.

\variable QtOhosAppKit::Want::fds

Represents the file descriptor map in the Want object. When serialized for startAbility(), each entry is passed to the platform using the fixed HarmonyOS file descriptor parameter format:

parameters[key] = { "type": "FD", "value": fd }
GLuint64 key
GLuint64 GLenum GLint fd

Use application-specific keys, for example a reverse-DNS prefix, and avoid using the same key in both fds and parameters. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/js-apis-app-ability-want} {Fds}.

\inmodule QtOhosAppKit

Since
5.12.12

The WantInfo class is to represent Ohos want type.

Definition at line 57 of file qohoswant_p.h.

Member Enumeration Documentation

◆ LaunchReason

Enumerator
Unknown 
StartAbility 
Continuation 
PrepareContinuation 
Preload 

Definition at line 60 of file qohoswant_p.h.

Constructor & Destructor Documentation

◆ ~WantInfo()

QtOhosAppKit::WantInfo::~WantInfo ( )
virtualdefault

◆ WantInfo()

QtOhosAppKit::WantInfo::WantInfo ( )
protecteddefault

Member Function Documentation

◆ launchReason()

virtual LaunchReason QtOhosAppKit::WantInfo::launchReason ( ) const
pure virtual

◆ tryGetContactInfo()

virtual std::optional< ContactInfo > QtOhosAppKit::WantInfo::tryGetContactInfo ( ) const
pure virtual

Tries to get contact information from the associated Want.

Returns an empty optional if no contact information is found. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section19799132782117} {systemShare.getContactInfo}.

See also
QtOhosAppKit::AbilityContext::newWantInfoReceived(std::shared_ptr<QtOhosAppKit::WantInfo> wantInfo)
std::shared_ptr<QtOhosAppKit::WantInfo> QtOhosAppKit::AppContext::appLaunchWantInfo()

◆ tryGetSharedRecordsFromShareKit()

virtual std::optional< QList< std::shared_ptr< ShareKit::SharedRecord > > > QtOhosAppKit::WantInfo::tryGetSharedRecordsFromShareKit ( ) const
pure virtual

◆ want()

virtual Want QtOhosAppKit::WantInfo::want ( ) const
pure virtual

Return associated with this instance Want object.


The documentation for this class was generated from the following files: