1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import Want from '../../@ohos.app.ability.Want'; 17import { ResultSet } from '../../data/rdb/resultSet'; 18import { AbilityInfo } from '../../bundle/abilityInfo'; 19import { DataAbilityResult } from '../../ability/dataAbilityResult'; 20import { DataAbilityOperation } from '../../ability/dataAbilityOperation'; 21import dataAbility from '../../@ohos.data.dataAbility'; 22import formBindingData from '../../@ohos.application.formBindingData'; 23import formInfo from '../../@ohos.app.form.formInfo'; 24import rdb from '../../@ohos.data.rdb'; 25import rpc from '../../@ohos.rpc'; 26import resourceManager from '../../@ohos.resourceManager'; 27import { PacMap } from '../../ability/dataAbilityHelper'; 28import { AsyncCallback } from '../../@ohos.base'; 29 30/** 31 * interface of form lifecycle. 32 * 33 * @interface LifecycleForm 34 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 35 * @FAModelOnly 36 * @since 7 37 */ 38export declare interface LifecycleForm { 39 /** 40 * Called to return a {@link formBindingData.FormBindingData} object. 41 * 42 * @param { Want } want - Indicates the detailed information for creating a {@link formBindingData#FormBindingData}. 43 * The {@code Want} object must include the form ID, form name, and grid style of the form, 44 * which can be obtained from {@link formInfo#FormParam#IDENTITY_KEY}, 45 * {@link formInfo#FormParam#NAME_KEY}, and {@link formInfo#FormParam#DIMENSION_KEY}, 46 * respectively. Such form information must be managed as persistent data for further form 47 * acquisition, update, and deletion. 48 * @returns { formBindingData.FormBindingData } Returns the created {@link formBindingData#FormBindingData} object. 49 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 50 * @FAModelOnly 51 * @since 8 52 */ 53 onCreate?(want: Want): formBindingData.FormBindingData; 54 55 /** 56 * Called when the form provider is notified that a temporary form is successfully converted to a normal form. 57 * 58 * @param { string } formId - Indicates the ID of the form. 59 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 60 * @FAModelOnly 61 * @since 8 62 */ 63 onCastToNormal?(formId: string): void; 64 65 /** 66 * Called to notify the form provider to update a specified form. 67 * 68 * @param { string } formId - Indicates the ID of the form to update. 69 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 70 * @FAModelOnly 71 * @since 8 72 */ 73 onUpdate?(formId: string): void; 74 75 /** 76 * Called when the form provider receives form events from the system. 77 * 78 * @param { object } newStatus - Indicates the form events occurred. The key in the {@code Map} object indicates 79 * form ID,and the value indicates the event type, which can be either 80 * {@link formInfo#VisibilityType#FORM_VISIBLE} or 81 * {@link formInfo#VisibilityType#FORM_INVISIBLE}. 82 * {@link formInfo#VisibilityType#FORM_VISIBLE} 83 * means that the form becomes visible, and 84 * {@link formInfo#VisibilityType#FORM_INVISIBLE} 85 * means that the form becomes invisible. 86 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 87 * @FAModelOnly 88 * @since 8 89 */ 90 /** 91 * Called when the form provider receives form events from the system. 92 * 93 * @param { Record<string, number> } newStatus - Indicates the form events occurred. The key in the {@code Map} 94 * object indicates form ID,and the value indicates the event type, 95 * which can be either 96 * {@link formInfo#VisibilityType#FORM_VISIBLE} or 97 * {@link formInfo#VisibilityType#FORM_INVISIBLE}. 98 * {@link formInfo#VisibilityType#FORM_VISIBLE} 99 * means that the form becomes visible, and 100 * {@link formInfo#VisibilityType#FORM_INVISIBLE} 101 * means that the form becomes invisible. 102 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 103 * @FAModelOnly 104 * @since 11 105 */ 106 onVisibilityChange?(newStatus: Record<string, number>): void; 107 108 /** 109 * Called when a specified message event defined by the form provider is triggered. This method is valid only for 110 * JS forms. 111 * 112 * @param { string } formId - Indicates the ID of the form on which the message event is triggered, which is 113 * provided by the client to the form provider. 114 * @param { string } message - Indicates the value of the {@code params} field of the message event. This parameter 115 * is used to identify the specific component on which the event is triggered. 116 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 117 * @FAModelOnly 118 * @since 8 119 */ 120 onEvent?(formId: string, message: string): void; 121 122 /** 123 * Called to notify the form provider that a specified form has been deleted. Override this method if 124 * you want your application, as the form provider, to be notified of form deletion. 125 * 126 * @param { string } formId - Indicates the ID of the deleted form. 127 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 128 * @FAModelOnly 129 * @since 8 130 */ 131 onDestroy?(formId: string): void; 132 133 /** 134 * Called to return a {@link FormState} object. 135 * <p>You must override this callback if you want this ability to return the actual form state. Otherwise, 136 * this method returns {@link FormState#DEFAULT} by default.</p> 137 * 138 * @param { Want } want - Indicates the description of the form for which the {@link formInfo#FormState} is obtained. 139 * The description covers the bundle name, ability name, module name, form name, form 140 * dimensions. 141 * @returns { formInfo.FormState } Returns the {@link formInfo#FormState} object. 142 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 143 * @FAModelOnly 144 * @since 8 145 */ 146 onAcquireFormState?(want: Want): formInfo.FormState; 147 148 /** 149 * Called when the system shares the form. 150 * 151 * @param { string } formId - Indicates the ID of the deleted form. 152 * @returns { object } Returns the wantParams object. 153 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 154 * @systemapi 155 * @FAModelOnly 156 * @since 9 157 */ 158 onShare?(formId: string): { [key: string]: any }; 159 160 /** 161 * Called when the system shares the form. 162 * The ability of this function is same as onShare. If both are set, this function will be called. 163 * 164 * @param { string } formId - Indicates the ID of the deleted form. 165 * @returns { Record<string, Object> } Returns the wantParams object. 166 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 167 * @systemapi 168 * @FAModelOnly 169 * @since 11 170 */ 171 onShareForm?(formId: string): Record<string, Object>; 172} 173 174/** 175 * interface of app lifecycle. 176 * 177 * @interface LifecycleApp 178 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 179 * @FAModelOnly 180 * @since 7 181 */ 182export declare interface LifecycleApp { 183 /** 184 * Called back when the state of an ability changes from <b>BACKGROUND</b> to <b>INACTIVE</b>. 185 * 186 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 187 * @FAModelOnly 188 * @since 7 189 */ 190 onShow?(): void; 191 192 /** 193 * Called back when an ability enters the <b>BACKGROUND</b> state. 194 * 195 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 196 * @FAModelOnly 197 * @since 7 198 */ 199 onHide?(): void; 200 201 /** 202 * Called back before an ability is destroyed. 203 * 204 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 205 * @FAModelOnly 206 * @since 7 207 */ 208 onDestroy?(): void; 209 210 /** 211 * Called back when an ability is started for initialization. 212 * 213 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 214 * @FAModelOnly 215 * @since 7 216 */ 217 onCreate?(): void; 218 219 /** 220 * Called when the window display mode of this ability changes, for example, from fullscreen mode 221 * to multi-window mode or from multi-window mode to fullscreen mode. 222 * 223 * @param { boolean } isShownInMultiWindow - Specifies whether this ability is currently in multi-window mode.The 224 * value {@code true} indicates the multi-window mode, and {@code false} 225 * indicates another mode. 226 * @param { resourceManager.Configuration } newConfig - Indicates the new configuration information about Page ability. 227 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 228 * @systemapi 229 * @FAModelOnly 230 * @since 7 231 */ 232 onWindowDisplayModeChanged?(isShownInMultiWindow: boolean, newConfig: resourceManager.Configuration): void; 233 234 /** 235 * Asks a user whether to start the migration. 236 * 237 * @returns { boolean } Returns {@code true} if the user allows the migration; returns {@code false} otherwise. 238 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 239 * @FAModelOnly 240 * @since 7 241 */ 242 onStartContinuation?(): boolean; 243 244 /** 245 * Saves the user data of a local ability generated during runtime. 246 * After the migration is triggered and the local ability is ready, this method is called when the Distributed 247 * Scheduler Service requests data from the local ability. 248 * 249 * @param { Object } data - Indicates the user data to save. 250 * @returns { boolean } Returns {@code true} if the data is successfully saved; returns {@code false} otherwise. 251 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 252 * @FAModelOnly 253 * @since 7 254 */ 255 onSaveData?(data: Object): boolean; 256 257 /** 258 * Called back when a local ability migration is complete. 259 * <p>You can define the processing logic after the migration is complete. For example, you can display a prompt to 260 * notify the user of the successful migration and then exit the local ability.</p> 261 * 262 * @param { number } result - Indicates the migration result code. The value {@code 0} indicates that the migration is 263 * successful, and {@code -1} indicates that the migration fails. 264 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 265 * @FAModelOnly 266 * @since 7 267 */ 268 onCompleteContinuation?(result: number): void; 269 270 /** 271 * Restores the user data saved during the migration for an ability on the remote device immediately after the 272 * ability is created on the remote device. Lifecycle scheduling for the ability starts only after the user data 273 * is restored. 274 * 275 * @param { Object } data - Indicates the user data to restore. 276 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 277 * @FAModelOnly 278 * @since 7 279 */ 280 onRestoreData?(data: Object): void; 281 282 /** 283 * Called to notify the local device when a running ability on the remote device is destroyed after a reversible 284 * migration is performed for the ability from the local device to the remote device. 285 * 286 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 287 * @FAModelOnly 288 * @since 7 289 */ 290 onRemoteTerminated?(): void; 291 292 /** 293 * This method is called when the system determines that the ability may be destroyed in an unexpected 294 * situation, for example, when the screen orientation changes or the user touches the Home key. Generally, 295 * this method is used only to save temporary states. 296 * 297 * @param { PacMap } outState - Indicates the {@code PacMap} object used for storing user data and states. This 298 * parameter cannot be null. 299 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 300 * @FAModelOnly 301 * @since 7 302 */ 303 onSaveAbilityState?(outState: PacMap): void; 304 305 /** 306 * This method is called if an ability was destroyed at a certain time due to resource reclaim or was 307 * unexpectedly destroyed and the {@link #onSaveAbilityState(PacMap)} method was called to save its user data and 308 * states. Generally, this method is called after the {@link #onStart(Want)} method. 309 * 310 * @param { PacMap } inState - Indicates the {@code PacMap} object used for storing data and states. This 311 * parameter can not be null. 312 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 313 * @FAModelOnly 314 * @since 7 315 */ 316 onRestoreAbilityState?(inState: PacMap): void; 317 318 /** 319 * Called back when an ability enters the <b>INACTIVE</b> state (an ability in this state is not interactive and may 320 * change to the <b>BACKGROUND</b> or <b>ACTIVE</b> state). 321 * 322 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 323 * @FAModelOnly 324 * @since 7 325 */ 326 onInactive?(): void; 327 328 /** 329 * Called back when an ability enters the <b>ACTIVE</b> state. 330 * 331 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 332 * @FAModelOnly 333 * @since 7 334 */ 335 onActive?(): void; 336 337 /** 338 * Called when the launch mode of an ability is set to singleton. 339 * 340 * @param { Want } want - Indicates the new {@code want} containing information about the ability. 341 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 342 * @FAModelOnly 343 * @since 7 344 */ 345 onNewWant?(want: Want): void; 346 347 /** 348 * Called when the system has determined to trim the memory, for example, when the ability is running in the 349 * background and there is no enough memory for running as many background processes as possible. 350 * 351 * @param { number } level - Indicates the memory trim level, which shows the current memory usage status. 352 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 353 * @FAModelOnly 354 * @since 7 355 */ 356 onMemoryLevel?(level: number): void; 357} 358 359/** 360 * interface of service lifecycle. 361 * 362 * @interface LifecycleService 363 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 364 * @FAModelOnly 365 * @since 7 366 */ 367export declare interface LifecycleService { 368 /** 369 * Called back when an ability is started for initialization (it can be called only once in the entire lifecycle of 370 * an ability). 371 * 372 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 373 * @FAModelOnly 374 * @since 7 375 */ 376 onStart?(): void; 377 378 /** 379 * Called back when Service is started. 380 * 381 * @param { Want } want - Indicates the want of Service to start. 382 * @param { number } startId - Indicates the number of times the Service ability has been started. {@code startId} is 383 * incremented by 1 every time the ability is started. For example, if the ability 384 * has been started for six times. 385 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 386 * @FAModelOnly 387 * @since 7 388 */ 389 onCommand?(want: Want, startId: number): void; 390 391 /** 392 * Called back before an ability is destroyed. 393 * 394 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 395 * @FAModelOnly 396 * @since 7 397 */ 398 onStop?(): void; 399 400 /** 401 * Called back when a Service ability is first connected to an ability. 402 * 403 * @param { Want } want - Indicates connection information about the Service ability. 404 * @returns { rpc.RemoteObject } Returns the proxy of the Service ability. 405 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 406 * @FAModelOnly 407 * @since 7 408 */ 409 onConnect?(want: Want): rpc.RemoteObject; 410 411 /** 412 * Called back when all abilities connected to a Service ability are disconnected. 413 * 414 * @param { Want } want - Indicates disconnection information about the Service ability. 415 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 416 * @FAModelOnly 417 * @since 7 418 */ 419 onDisconnect?(want: Want): void; 420 421 /** 422 * Called when a new client attempts to connect to a Service ability after all previous client connections to it 423 * are disconnected. 424 * <p>The Service ability must have been started but not been destroyed, that is, {@link #startAbility} has been 425 * called but {@link #terminateSelf} has not.</p> 426 * 427 * @param { Want } want - Indicates the want of the Service ability being connected. 428 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 429 * @FAModelOnly 430 * @since 7 431 */ 432 onReconnect?(want: Want): void; 433} 434 435/** 436 * interface of data lifecycle. 437 * 438 * @interface LifecycleData 439 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 440 * @FAModelOnly 441 * @since 7 442 */ 443export declare interface LifecycleData { 444 /** 445 * Updates one or more data records in the database. This method should be implemented by a Data ability. 446 * 447 * @param { string } uri - Indicates the database table storing the data to update. 448 * @param { rdb.ValuesBucket } valueBucket - Indicates the data to update. This parameter can be null. 449 * @param { dataAbility.DataAbilityPredicates } predicates - Indicates filter criteria. If this parameter is null, 450 * all data records will be updated by default. 451 * @param { AsyncCallback<number> } callback - function specified by framework to receive the result, developer should 452 * call this function to return the result to framework. 453 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 454 * @FAModelOnly 455 * @since 7 456 */ 457 update?( 458 uri: string, 459 valueBucket: rdb.ValuesBucket, 460 predicates: dataAbility.DataAbilityPredicates, 461 callback: AsyncCallback<number> 462 ): void; 463 464 /** 465 * Queries one or more data records in the database. This method should be implemented by a Data ability. 466 * 467 * @param { string } uri - Indicates the database table storing the data to query. 468 * @param { Array<string> } columns - Indicates the columns to be queried, in array, for example, {"name","age"}. 469 * You should define the processing logic when this parameter is null. 470 * @param { dataAbility.DataAbilityPredicates } predicates - Indicates filter criteria. If this parameter is null, 471 * all data records will be queried by default. 472 * @param { AsyncCallback<ResultSet> } callback - function specified by framework to receive the result, developer 473 * should call this function to return the result to framework. 474 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 475 * @FAModelOnly 476 * @since 7 477 */ 478 query?( 479 uri: string, 480 columns: Array<string>, 481 predicates: dataAbility.DataAbilityPredicates, 482 callback: AsyncCallback<ResultSet> 483 ): void; 484 485 /** 486 * Deletes one or more data records. This method should be implemented by a Data ability. 487 * 488 * @param { string } uri - Indicates the database table storing the data to delete. 489 * @param { dataAbility.DataAbilityPredicates } predicates - Indicates filter criteria. If this parameter is null, 490 * all data records will be deleted by default. 491 * @param { AsyncCallback<number> } callback - function specified by framework to receive the result, developer should 492 * call this function to return the result to framework. 493 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 494 * @FAModelOnly 495 * @since 7 496 */ 497 delete?(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void; 498 499 /** 500 * Converts the given {@code uri} that refer to the Data ability into a normalized URI. A normalized URI can be 501 * used across devices, persisted, backed up, and restored. It can refer to the same item in the Data ability 502 * even if the context has changed. 503 * 504 * @param { string } uri - Indicates the uri to normalize. 505 * @param { AsyncCallback<string> } callback - function specified by framework to receive the result, developer 506 * should call this function to return the result to framework. 507 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 508 * @FAModelOnly 509 * @since 7 510 */ 511 normalizeUri?(uri: string, callback: AsyncCallback<string>): void; 512 513 /** 514 * Inserts multiple data records into the database. This method should be implemented by a Data ability. 515 * 516 * @param { string } uri - Indicates the position where the data is to insert. 517 * @param { Array<rdb.ValuesBucket> } valueBuckets - Indicates the data to insert. 518 * @param { AsyncCallback<number> } callback - function specified by framework to receive the result, developer should 519 * call this function to return the result to framework. 520 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 521 * @FAModelOnly 522 * @since 7 523 */ 524 batchInsert?(uri: string, valueBuckets: Array<rdb.ValuesBucket>, callback: AsyncCallback<number>): void; 525 526 /** 527 * Converts the given normalized {@code uri} generated by {@link #normalizeUri(uri)} into a denormalized one. 528 * The default implementation of this method returns the original uri passed to it. 529 * 530 * @param { string } uri - Indicates the uri to denormalize. 531 * @param { AsyncCallback<string> } callback - function specified by framework to receive the result, developer 532 * should call this function to return the result to framework. 533 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 534 * @FAModelOnly 535 * @since 7 536 */ 537 denormalizeUri?(uri: string, callback: AsyncCallback<string>): void; 538 539 /** 540 * Inserts a data record into the database. This method should be implemented by a Data ability. 541 * 542 * @param { string } uri - Indicates the position where the data is to insert. 543 * @param { rdb.ValuesBucket } valueBucket - Indicates the data to insert. 544 * @param { AsyncCallback<number> } callback - function specified by framework to receive the result, developer 545 * should call this function to return the result to framework. 546 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 547 * @FAModelOnly 548 * @since 7 549 */ 550 insert?(uri: string, valueBucket: rdb.ValuesBucket, callback: AsyncCallback<number>): void; 551 552 /** 553 * Opens a file. This method should be implemented by a Data ability. 554 * 555 * @param { string } uri - Indicates the path of the file to open. 556 * @param { string } mode - Indicates the open mode, which can be "r" for read-only access, "w" for write-only access 557 * (erasing whatever data is currently in the file), "wt" for write access that truncates any 558 * existing file,"wa" for write-only access to append to any existing data, "rw" for read and 559 * write access on any existing data, or "rwt" for read and write access that truncates any 560 * existing file. 561 * @param { AsyncCallback<number> } callback - function specified by framework to receive the result, developer should 562 * call this function to return the result to framework. 563 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 564 * @FAModelOnly 565 * @since 7 566 */ 567 openFile?(uri: string, mode: string, callback: AsyncCallback<number>): void; 568 569 /** 570 * Obtains the MIME type of files. This method should be implemented by a Data ability. 571 * 572 * @param { string } uri - Indicates the path of the files to obtain. 573 * @param { string } mimeTypeFilter - Indicates the MIME type of the files to obtain. This parameter cannot be set to 574 * {@code null}. 575 * <p>1. "*/*": Obtains all types supported by a Data ability. 576 * <p>2. "image/*": Obtains files whose main type is image of any subtype. 577 * <p>3. "*/jpg": Obtains files whose subtype is JPG of any main type. 578 * @param { AsyncCallback<Array<string>> } callback - function specified by framework to receive the result, developer 579 * should call this function to return the result to framework. 580 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 581 * @FAModelOnly 582 * @since 7 583 */ 584 getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback<Array<string>>): void; 585 586 /** 587 * Called to carry {@code AbilityInfo} to this ability after the ability is initialized. 588 * 589 * @param { AbilityInfo } info - Indicates the {@code AbilityInfo} object containing information about this ability. 590 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 591 * @FAModelOnly 592 * @since 7 593 */ 594 onInitialized?(info: AbilityInfo): void; 595 596 /** 597 * Obtains the MIME type matching the data specified by the URI of the Data ability. This method should be 598 * implemented by a Data ability. 599 * <p>Data abilities supports general data types, including text, HTML, and JPEG.</p> 600 * 601 * @param { string } uri - Indicates the uri of the data. 602 * @param { AsyncCallback<string> } callback - function specified by framework to receive the result, developer should 603 * call this function to return the result to framework. 604 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 605 * @FAModelOnly 606 * @since 7 607 */ 608 getType?(uri: string, callback: AsyncCallback<string>): void; 609 610 /** 611 * Performs batch operations on the database. This method should be implemented by a Data ability. 612 * 613 * @param { Array<DataAbilityOperation> } ops - Indicates the data operation list, which can contain multiple operations 614 * on the database. 615 * @param { AsyncCallback<Array<DataAbilityResult>> } callback - specified by framework to receive the result, 616 * developer should call this function to return 617 * the result to framework. 618 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 619 * @FAModelOnly 620 * @since 7 621 */ 622 executeBatch?(ops: Array<DataAbilityOperation>, callback: AsyncCallback<Array<DataAbilityResult>>): void; 623 624 /** 625 * Defines a method in this Data ability (implementation depending on child classes). 626 * 627 * @param { string } method - Indicates the method name. 628 * @param { string } arg - Indicates the parameter transferred by the method. 629 * @param { PacMap } extras - Indicates the parameter transferred by the method. 630 * @param { AsyncCallback<PacMap> } callback - function specified by framework to receive the result, developer 631 * should call this function to return the result to framework. 632 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 633 * @FAModelOnly 634 * @since 7 635 */ 636 call?(method: string, arg: string, extras: PacMap, callback: AsyncCallback<PacMap>): void; 637} 638