SyncLayerOption Class

  • SyncLayerOption
  • class Esri::ArcGISRuntime::SyncLayerOption

    Specifies a SyncDirection for any layer in the geodatabase. More...

    Header: #include <SyncLayerOption.h>
    Since: Esri::ArcGISRuntime 100.0

    Public Functions

    SyncLayerOption()
    SyncLayerOption(qint64 layerId)
    SyncLayerOption(qint64 layerId, Esri::ArcGISRuntime::SyncDirection syncDirection)
    SyncLayerOption(const Esri::ArcGISRuntime::SyncLayerOption &other)
    SyncLayerOption(Esri::ArcGISRuntime::SyncLayerOption &&other)
    ~SyncLayerOption()
    Esri::ArcGISRuntime::SyncLayerOption clone() const
    bool isEmpty() const
    qint64 layerId() const
    void setLayerId(qint64 layerOrTableId)
    void setSyncDirection(Esri::ArcGISRuntime::SyncDirection syncDirection)
    Esri::ArcGISRuntime::SyncDirection syncDirection() const
    Esri::ArcGISRuntime::SyncLayerOption &operator=(const Esri::ArcGISRuntime::SyncLayerOption &other)
    Esri::ArcGISRuntime::SyncLayerOption &operator=(Esri::ArcGISRuntime::SyncLayerOption &&other)

    Detailed Description

    If the geodatabase supports the SyncModel::Layer synchronization model, you can add a SyncLayerOption to the SyncGeodatabaseParameters::layerOptions collection, to specify how individual the geodatabase layers and tables are synchronized.

    The default sync direction for layers is bidirectional (SyncDirection::Bidirectional). Therefore, you need to provide a SyncLayerOption if you do not want the default behavior.

    Relevant samples:

    Member Function Documentation

    SyncLayerOption::SyncLayerOption()

    Default constructor.

    [explicit] SyncLayerOption::SyncLayerOption(qint64 layerId)

    Constructor using a layer ID.

    • layerId - The layer ID.

    SyncLayerOption::SyncLayerOption(qint64 layerId, Esri::ArcGISRuntime::SyncDirection syncDirection)

    Constructor using a layer ID and an option for direction in which to sync data with the service.

    • layerId - A layer id to synchronize.
    • syncDirection - The synchronization direction of the layer or table.

    SyncLayerOption::SyncLayerOption(const Esri::ArcGISRuntime::SyncLayerOption &other)

    Copy constructor from other SyncLayerOption.

    SyncLayerOption::SyncLayerOption(Esri::ArcGISRuntime::SyncLayerOption &&other)

    Move constructor from other SyncLayerOption.

    SyncLayerOption::~SyncLayerOption()

    Destructor.

    [since Esri::ArcGISRuntime 200.1] Esri::ArcGISRuntime::SyncLayerOption SyncLayerOption::clone() const

    Clones the SyncLayerOption to a new instance.

    Returns a new instance of the current SyncLayerOption.

    This function was introduced in Esri::ArcGISRuntime 200.1.

    bool SyncLayerOption::isEmpty() const

    Returns whether this SyncLayerOption is empty.

    If SyncLayerOption is empty, it is not possible to change properties.

    qint64 SyncLayerOption::layerId() const

    Returns the layer or table Id to specify the SyncDirection.

    The Id must match a table of layer Id in the synchronized geodatabase.

    See also setLayerId().

    void SyncLayerOption::setLayerId(qint64 layerOrTableId)

    Sets the ID of the layer or table for which these options are defined.

    • layerOrTableId - The ID for the table or layer.

    The default value is -1 if SyncLayerOption is empty or 0 if it is not empty.

    See also layerId().

    void SyncLayerOption::setSyncDirection(Esri::ArcGISRuntime::SyncDirection syncDirection)

    Sets the direction in which to sync the layer's data with the service.

    • syncDirection - The sync direction.

    The default value is SyncDirection::None if SyncLayerOption is empty or SyncDirection::Bidirectional if it is not empty.

    See also syncDirection().

    Esri::ArcGISRuntime::SyncDirection SyncLayerOption::syncDirection() const

    Returns the synchronization direction for the specified layer or table Id.

    The default value is SyncDirection::Bidirectional.

    See also setSyncDirection().

    Esri::ArcGISRuntime::SyncLayerOption &SyncLayerOption::operator=(const Esri::ArcGISRuntime::SyncLayerOption &other)

    Assignment operator from other SyncLayerOption.

    Esri::ArcGISRuntime::SyncLayerOption &SyncLayerOption::operator=(Esri::ArcGISRuntime::SyncLayerOption &&other)

    Move operator from other SyncLayerOption.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

    You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

    Your ArcGIS portal

    Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

    Your ArcGIS Location Platform dashboard

    Manage billing, monitor service usage, and access additional resources.

    Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

    Close