• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2024 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
16/**
17 * @file
18 * @kit AbilityKit
19 */
20
21/**
22 * The definition of AbilityConstant.
23 *
24 * @namespace AbilityConstant
25 * @syscap SystemCapability.Ability.AbilityRuntime.Core
26 * @stagemodelonly
27 * @since 9
28 */
29/**
30 * The definition of AbilityConstant.
31 *
32 * @namespace AbilityConstant
33 * @syscap SystemCapability.Ability.AbilityRuntime.Core
34 * @stagemodelonly
35 * @crossplatform
36 * @since 10
37 */
38/**
39 * The definition of AbilityConstant.
40 *
41 * @namespace AbilityConstant
42 * @syscap SystemCapability.Ability.AbilityRuntime.Core
43 * @stagemodelonly
44 * @crossplatform
45 * @atomicservice
46 * @since 11
47 */
48declare namespace AbilityConstant {
49  /**
50   * Interface of launch param.
51   *
52   * @typedef LaunchParam
53   * @syscap SystemCapability.Ability.AbilityRuntime.Core
54   * @stagemodelonly
55   * @since 9
56   */
57  /**
58   * Interface of launch param.
59   *
60   * @typedef LaunchParam
61   * @syscap SystemCapability.Ability.AbilityRuntime.Core
62   * @stagemodelonly
63   * @crossplatform
64   * @since 10
65   */
66  /**
67   * Interface of launch param.
68   *
69   * @typedef LaunchParam
70   * @syscap SystemCapability.Ability.AbilityRuntime.Core
71   * @stagemodelonly
72   * @crossplatform
73   * @atomicservice
74   * @since 11
75   */
76  export interface LaunchParam {
77    /**
78     * Indicates launch reason.
79     *
80     * @type { LaunchReason }
81     * @syscap SystemCapability.Ability.AbilityRuntime.Core
82     * @stagemodelonly
83     * @since 9
84     */
85    /**
86     * Indicates launch reason.
87     *
88     * @type { LaunchReason }
89     * @syscap SystemCapability.Ability.AbilityRuntime.Core
90     * @stagemodelonly
91     * @crossplatform
92     * @since 10
93     */
94    /**
95     * Indicates launch reason.
96     *
97     * @type { LaunchReason }
98     * @syscap SystemCapability.Ability.AbilityRuntime.Core
99     * @stagemodelonly
100     * @crossplatform
101     * @atomicservice
102     * @since 11
103     */
104    launchReason: LaunchReason;
105
106    /**
107     * Indicates launch detailed reason.
108     *
109     * @type { string }
110     * @syscap SystemCapability.Ability.AbilityRuntime.Core
111     * @stagemodelonly
112     * @atomicservice
113     * @since 18
114     */
115    launchReasonMessage?: string;
116
117    /**
118     * Indicates last exit reason.
119     *
120     * @type { LastExitReason }
121     * @syscap SystemCapability.Ability.AbilityRuntime.Core
122     * @stagemodelonly
123     * @since 9
124     */
125    /**
126     * Indicates last exit reason.
127     *
128     * @type { LastExitReason }
129     * @syscap SystemCapability.Ability.AbilityRuntime.Core
130     * @stagemodelonly
131     * @crossplatform
132     * @since 10
133     */
134    /**
135     * Indicates last exit reason.
136     *
137     * @type { LastExitReason }
138     * @syscap SystemCapability.Ability.AbilityRuntime.Core
139     * @stagemodelonly
140     * @crossplatform
141     * @atomicservice
142     * @since 11
143     */
144    lastExitReason: LastExitReason;
145
146    /**
147     * Indicates last exit detailed reason.
148     *
149     * @type { string }
150     * @syscap SystemCapability.Ability.AbilityRuntime.Core
151     * @stagemodelonly
152     * @atomicservice
153     * @since 12
154     */
155    lastExitMessage: string;
156
157    /**
158     * Indicates process last exit details.
159     *
160     * @type { LastExitDetailInfo }
161     * @syscap SystemCapability.Ability.AbilityRuntime.Core
162     * @stagemodelonly
163     * @atomicservice
164     * @since 18
165     */
166    lastExitDetailInfo?: LastExitDetailInfo;
167  }
168
169  /**
170   * The definition of detailed information of process exits
171   *
172   * @typedef LastExitDetailInfo
173   * @syscap SystemCapability.Ability.AbilityRuntime.Core
174   * @stagemodelonly
175   * @atomicservice
176   * @since 18
177   */
178  export interface LastExitDetailInfo {
179    /**
180     * Indicates the exited process id
181     *
182     * @type { number }
183     * @syscap SystemCapability.Ability.AbilityRuntime.Core
184     * @stagemodelonly
185     * @atomicservice
186     * @since 18
187     */
188    pid: number;
189
190    /**
191     * Indicates the exited process name
192     *
193     * @type { string }
194     * @syscap SystemCapability.Ability.AbilityRuntime.Core
195     * @stagemodelonly
196     * @atomicservice
197     * @since 18
198     */
199    processName: string;
200
201    /**
202     * Indicates the uid of exited process
203     *
204     * @type { number }
205     * @syscap SystemCapability.Ability.AbilityRuntime.Core
206     * @stagemodelonly
207     * @atomicservice
208     * @since 18
209     */
210    uid: number;
211
212    /**
213     * Indicates the exit sub-reason
214     *
215     * @type { number }
216     * @syscap SystemCapability.Ability.AbilityRuntime.Core
217     * @stagemodelonly
218     * @atomicservice
219     * @since 18
220     */
221    exitSubReason: number;
222
223    /**
224     * Indicates the exit detailed reason
225     *
226     * @type { string }
227     * @syscap SystemCapability.Ability.AbilityRuntime.Core
228     * @stagemodelonly
229     * @atomicservice
230     * @since 18
231     */
232    exitMsg: string;
233
234    /**
235     * Indicates the rss value when process exit
236     *
237     * @type { number }
238     * @syscap SystemCapability.Ability.AbilityRuntime.Core
239     * @stagemodelonly
240     * @atomicservice
241     * @since 18
242     */
243    rss: number;
244
245    /**
246     * Indicates the pss value when process exit
247     *
248     * @type { number }
249     * @syscap SystemCapability.Ability.AbilityRuntime.Core
250     * @stagemodelonly
251     * @atomicservice
252     * @since 18
253     */
254    pss: number;
255
256    /**
257     * Indicates the timestamp when process exit
258     *
259     * @type { number }
260     * @syscap SystemCapability.Ability.AbilityRuntime.Core
261     * @stagemodelonly
262     * @atomicservice
263     * @since 18
264     */
265    timestamp: number;
266  }
267
268  /**
269   * Type of launch reason.
270   *
271   * @enum { number }
272   * @syscap SystemCapability.Ability.AbilityRuntime.Core
273   * @stagemodelonly
274   * @since 9
275   */
276  /**
277   * Type of launch reason.
278   *
279   * @enum { number }
280   * @syscap SystemCapability.Ability.AbilityRuntime.Core
281   * @stagemodelonly
282   * @crossplatform
283   * @since 10
284   */
285  /**
286   * Type of launch reason.
287   *
288   * @enum { number }
289   * @syscap SystemCapability.Ability.AbilityRuntime.Core
290   * @stagemodelonly
291   * @crossplatform
292   * @atomicservice
293   * @since 11
294   */
295  export enum LaunchReason {
296    /**
297     * Unknown reason.
298     *
299     * @syscap SystemCapability.Ability.AbilityRuntime.Core
300     * @stagemodelonly
301     * @since 9
302     */
303    /**
304     * @syscap SystemCapability.Ability.AbilityRuntime.Core
305     * @stagemodelonly
306     * @crossplatform
307     * @since 10
308     */
309    /**
310     * @syscap SystemCapability.Ability.AbilityRuntime.Core
311     * @stagemodelonly
312     * @crossplatform
313     * @atomicservice
314     * @since 11
315     */
316    UNKNOWN = 0,
317
318    /**
319     * Start ability through the startAbility interface.
320     *
321     * @syscap SystemCapability.Ability.AbilityRuntime.Core
322     * @stagemodelonly
323     * @since 9
324     */
325    /**
326     * Start ability through the startAbility interface.
327     *
328     * @syscap SystemCapability.Ability.AbilityRuntime.Core
329     * @stagemodelonly
330     * @atomicservice
331     * @since 11
332     */
333    START_ABILITY = 1,
334
335    /**
336     * Start ability through the startAbilityByCall interface.
337     *
338     * @syscap SystemCapability.Ability.AbilityRuntime.Core
339     * @stagemodelonly
340     * @since 9
341     */
342    /**
343     * Start ability through the startAbilityByCall interface.
344     *
345     * @syscap SystemCapability.Ability.AbilityRuntime.Core
346     * @stagemodelonly
347     * @atomicservice
348     * @since 11
349     */
350    CALL = 2,
351
352    /**
353     * Start ability through cross-end device migration.
354     *
355     * @syscap SystemCapability.Ability.AbilityRuntime.Core
356     * @stagemodelonly
357     * @since 9
358     */
359    /**
360     * Start ability through cross-end device migration.
361     *
362     * @syscap SystemCapability.Ability.AbilityRuntime.Core
363     * @stagemodelonly
364     * @atomicservice
365     * @since 11
366     */
367    CONTINUATION = 3,
368
369    /**
370     * After the application is restored, the ability is automatically restored and started when the application fails.
371     *
372     * @syscap SystemCapability.Ability.AbilityRuntime.Core
373     * @stagemodelonly
374     * @since 9
375     */
376    /**
377     * After the application is restored, the ability is automatically restored and started when the application fails.
378     *
379     * @syscap SystemCapability.Ability.AbilityRuntime.Core
380     * @stagemodelonly
381     * @atomicservice
382     * @since 11
383     */
384    APP_RECOVERY = 4,
385
386    /**
387     * Start ability through the acquireShareData interface.
388     *
389     * @syscap SystemCapability.Ability.AbilityRuntime.Core
390     * @stagemodelonly
391     * @since 10
392     */
393    /**
394     * Start ability through the acquireShareData interface.
395     *
396     * @syscap SystemCapability.Ability.AbilityRuntime.Core
397     * @stagemodelonly
398     * @atomicservice
399     * @since 11
400     */
401    SHARE = 5,
402
403    /**
404     * Start ability by booting it up.
405     *
406     * @syscap SystemCapability.Ability.AbilityRuntime.Core
407     * @stagemodelonly
408     * @since 11
409     */
410    AUTO_STARTUP = 8,
411
412    /**
413     * Start ability through the insight intent interface.
414     *
415     * @syscap SystemCapability.Ability.AbilityRuntime.Core
416     * @stagemodelonly
417     * @atomicservice
418     * @since 11
419     */
420    INSIGHT_INTENT = 9,
421
422    /**
423     * Prepare start ability through cross-end device migration.
424     *
425     * @syscap SystemCapability.Ability.AbilityRuntime.Core
426     * @stagemodelonly
427     * @atomicservice
428     * @since 12
429     */
430    PREPARE_CONTINUATION = 10,
431  }
432
433  /**
434   * Type of last exit reason.
435   *
436   * @enum { number }
437   * @syscap SystemCapability.Ability.AbilityRuntime.Core
438   * @stagemodelonly
439   * @since 9
440   */
441  /**
442   * Type of last exit reason.
443   *
444   * @enum { number }
445   * @syscap SystemCapability.Ability.AbilityRuntime.Core
446   * @stagemodelonly
447   * @crossplatform
448   * @since 10
449   */
450  /**
451   * Type of last exit reason.
452   *
453   * @enum { number }
454   * @syscap SystemCapability.Ability.AbilityRuntime.Core
455   * @stagemodelonly
456   * @crossplatform
457   * @atomicservice
458   * @since 11
459   */
460  export enum LastExitReason {
461    /**
462     * Exit reason : Unknown. The reason for the last exit of the target application is not recorded in the application
463     *               framework.
464     *
465     * @syscap SystemCapability.Ability.AbilityRuntime.Core
466     * @stagemodelonly
467     * @since 9
468     */
469    /**
470     * Exit reason : Unknown. The reason for the last exit of the target application is not recorded in the application
471     *               framework.
472     *
473     * @syscap SystemCapability.Ability.AbilityRuntime.Core
474     * @stagemodelonly
475     * @crossplatform
476     * @since 10
477     */
478    /**
479     * Exit reason : Unknown. The reason for the last exit of the target application is not recorded in the application
480     *               framework.
481     *
482     * @syscap SystemCapability.Ability.AbilityRuntime.Core
483     * @stagemodelonly
484     * @crossplatform
485     * @atomicservice
486     * @since 11
487     */
488    UNKNOWN = 0,
489
490    /**
491     * Exit reason : Ability is not responding.
492     *
493     * @syscap SystemCapability.Ability.AbilityRuntime.Core
494     * @stagemodelonly
495     * @since 9
496     * @deprecated since 10
497     * @useinstead AbilityConstant.LastExitReason#APP_FREEZE
498     */
499    ABILITY_NOT_RESPONDING = 1,
500
501    /**
502     * Exit reason : normally. App exit due to user active close.
503     *
504     * @syscap SystemCapability.Ability.AbilityRuntime.Core
505     * @stagemodelonly
506     * @since 9
507     */
508    /**
509     * Exit reason : normally. App exit due to user active close.
510     *
511     * @syscap SystemCapability.Ability.AbilityRuntime.Core
512     * @stagemodelonly
513     * @atomicservice
514     * @since 11
515     */
516    NORMAL = 2,
517
518    /**
519     * Exit reason : cpp crash. The app exit due to native exception signal.
520     *
521     * @syscap SystemCapability.Ability.AbilityRuntime.Core
522     * @stagemodelonly
523     * @since 10
524     */
525    /**
526     * Exit reason : cpp crash. The app exit due to native exception signal.
527     *
528     * @syscap SystemCapability.Ability.AbilityRuntime.Core
529     * @stagemodelonly
530     * @atomicservice
531     * @since 11
532     */
533    CPP_CRASH = 3,
534
535    /**
536     * Exit reason : js error. App exit due to js error.
537     *
538     * @syscap SystemCapability.Ability.AbilityRuntime.Core
539     * @stagemodelonly
540     * @since 10
541     */
542    /**
543     * Exit reason : js error. App exit due to js error.
544     *
545     * @syscap SystemCapability.Ability.AbilityRuntime.Core
546     * @stagemodelonly
547     * @atomicservice
548     * @since 11
549     */
550    JS_ERROR = 4,
551
552    /**
553     * Exit reason : app freeze. App exit due to appFreeze error.
554     *
555     * @syscap SystemCapability.Ability.AbilityRuntime.Core
556     * @stagemodelonly
557     * @since 10
558     */
559    /**
560     * Exit reason : app freeze. App exit due to appFreeze error.
561     *
562     * @syscap SystemCapability.Ability.AbilityRuntime.Core
563     * @stagemodelonly
564     * @atomicservice
565     * @since 11
566     */
567    APP_FREEZE = 5,
568
569    /**
570     * Exit reason : performance control. App exit due to system performance issues, such as device low memory.
571     *
572     * @syscap SystemCapability.Ability.AbilityRuntime.Core
573     * @stagemodelonly
574     * @since 10
575     */
576    /**
577     * Exit reason : performance control. App exit due to system performance issues, such as device low memory.
578     *
579     * @syscap SystemCapability.Ability.AbilityRuntime.Core
580     * @stagemodelonly
581     * @atomicservice
582     * @since 11
583     */
584    PERFORMANCE_CONTROL = 6,
585
586    /**
587     * Exit reason : resource control. App exit due to resource usage violation, such as exceed cpu/io/memory usage.
588     *
589     * @syscap SystemCapability.Ability.AbilityRuntime.Core
590     * @stagemodelonly
591     * @since 10
592     */
593    /**
594     * Exit reason : resource control. App exit due to resource usage violation, such as exceed cpu/io/memory usage.
595     *
596     * @syscap SystemCapability.Ability.AbilityRuntime.Core
597     * @stagemodelonly
598     * @atomicservice
599     * @since 11
600     */
601    RESOURCE_CONTROL = 7,
602
603    /**
604     * Exit reason : upgrade. App exit due to upgrade.
605     *
606     * @syscap SystemCapability.Ability.AbilityRuntime.Core
607     * @stagemodelonly
608     * @since 10
609     */
610    /**
611     * Exit reason : upgrade. App exit due to upgrade.
612     *
613     * @syscap SystemCapability.Ability.AbilityRuntime.Core
614     * @stagemodelonly
615     * @atomicservice
616     * @since 11
617     */
618    UPGRADE = 8,
619
620    /**
621     * Exit reason : USER_REQUEST. App exit due to user request.
622     *
623     * @syscap SystemCapability.Ability.AbilityRuntime.Core
624     * @stagemodelonly
625     * @atomicservice
626     * @since 18
627     */
628    USER_REQUEST = 9,
629
630    /**
631     * Exit reason : SIGNAL. App exit due to system signal.
632     *
633     * @syscap SystemCapability.Ability.AbilityRuntime.Core
634     * @stagemodelonly
635     * @atomicservice
636     * @since 18
637     */
638    SIGNAL = 10
639  }
640
641  /**
642   * Type of onContinue result.
643   *
644   * @enum { number }
645   * @syscap SystemCapability.Ability.AbilityRuntime.Core
646   * @stagemodelonly
647   * @since 9
648   */
649  /**
650   * Type of onContinue result.
651   *
652   * @enum { number }
653   * @syscap SystemCapability.Ability.AbilityRuntime.Core
654   * @stagemodelonly
655   * @atomicservice
656   * @since 11
657   */
658  export enum OnContinueResult {
659    /**
660     * Agree to the result of Ability migration.
661     *
662     * @syscap SystemCapability.Ability.AbilityRuntime.Core
663     * @stagemodelonly
664     * @since 9
665     */
666    /**
667     * Agree to the result of Ability migration.
668     *
669     * @syscap SystemCapability.Ability.AbilityRuntime.Core
670     * @stagemodelonly
671     * @atomicservice
672     * @since 11
673     */
674    AGREE = 0,
675
676    /**
677     * Reject to the result of Ability migration.
678     *
679     * @syscap SystemCapability.Ability.AbilityRuntime.Core
680     * @stagemodelonly
681     * @since 9
682     */
683    /**
684     * Reject to the result of Ability migration.
685     *
686     * @syscap SystemCapability.Ability.AbilityRuntime.Core
687     * @stagemodelonly
688     * @atomicservice
689     * @since 11
690     */
691    REJECT = 1,
692
693    /**
694     * Mismatch to the result of Ability migration.
695     *
696     * @syscap SystemCapability.Ability.AbilityRuntime.Core
697     * @stagemodelonly
698     * @since 9
699     */
700    /**
701     * Mismatch to the result of Ability migration.
702     *
703     * @syscap SystemCapability.Ability.AbilityRuntime.Core
704     * @stagemodelonly
705     * @atomicservice
706     * @since 11
707     */
708    MISMATCH = 2
709  }
710
711  /**
712   * Type of memory level.
713   *
714   * @enum { number }
715   * @syscap SystemCapability.Ability.AbilityRuntime.Core
716   * @stagemodelonly
717   * @since 9
718   */
719  /**
720   * Type of memory level.
721   *
722   * @enum { number }
723   * @syscap SystemCapability.Ability.AbilityRuntime.Core
724   * @stagemodelonly
725   * @atomicservice
726   * @since 11
727   */
728  export enum MemoryLevel {
729    /**
730     * Memory footprint is moderate.
731     *
732     * @syscap SystemCapability.Ability.AbilityRuntime.Core
733     * @stagemodelonly
734     * @since 9
735     */
736    /**
737     * Memory footprint is moderate.
738     *
739     * @syscap SystemCapability.Ability.AbilityRuntime.Core
740     * @stagemodelonly
741     * @atomicservice
742     * @since 11
743     */
744    MEMORY_LEVEL_MODERATE = 0,
745
746    /**
747     * Low memory footprint.
748     *
749     * @syscap SystemCapability.Ability.AbilityRuntime.Core
750     * @stagemodelonly
751     * @since 9
752     */
753    /**
754     * Low memory footprint.
755     *
756     * @syscap SystemCapability.Ability.AbilityRuntime.Core
757     * @stagemodelonly
758     * @atomicservice
759     * @since 11
760     */
761    MEMORY_LEVEL_LOW = 1,
762
763    /**
764     * High memory footprint.
765     *
766     * @syscap SystemCapability.Ability.AbilityRuntime.Core
767     * @stagemodelonly
768     * @since 9
769     */
770    /**
771     * High memory footprint.
772     *
773     * @syscap SystemCapability.Ability.AbilityRuntime.Core
774     * @stagemodelonly
775     * @atomicservice
776     * @since 11
777     */
778    MEMORY_LEVEL_CRITICAL = 2
779  }
780
781  /**
782   * Type of window mode.
783   *
784   * @enum { number }
785   * @syscap SystemCapability.Ability.AbilityRuntime.Core
786   * @stagemodelonly
787   * @since 12
788   */
789  export enum WindowMode {
790    /**
791     * The window mode is not defined.
792     *
793     * @syscap SystemCapability.Ability.AbilityRuntime.Core
794     * @systemapi
795     * @stagemodelonly
796     * @since 12
797     */
798    WINDOW_MODE_UNDEFINED = 0,
799
800    /**
801     * Full screen mode.
802     *
803     * @syscap SystemCapability.Ability.AbilityRuntime.Core
804     * @stagemodelonly
805     * @since 12
806     */
807    WINDOW_MODE_FULLSCREEN = 1,
808
809    /**
810     * Primary screen in split-screen mode. If the screen is horizontal, it means the left split screen.
811     * It is valid only in intra-app redirection scenarios.
812     *
813     * @syscap SystemCapability.Ability.AbilityRuntime.Core
814     * @stagemodelonly
815     * @since 12
816     */
817    WINDOW_MODE_SPLIT_PRIMARY = 100,
818
819    /**
820     * Secondary screen in split-screen mode. If the screen is horizontal, it means the right split screen.
821     * It is valid only in intra-app redirection scenarios.
822     *
823     * @syscap SystemCapability.Ability.AbilityRuntime.Core
824     * @stagemodelonly
825     * @since 12
826     */
827    WINDOW_MODE_SPLIT_SECONDARY = 101,
828
829    /**
830     * Free floating window mode.
831     *
832     * @syscap SystemCapability.Ability.AbilityRuntime.Core
833     * @systemapi
834     * @stagemodelonly
835     * @since 12
836     */
837    WINDOW_MODE_FLOATING = 102
838  }
839
840  /**
841   * Type of onSave result.
842   *
843   * @enum { number }
844   * @syscap SystemCapability.Ability.AbilityRuntime.Core
845   * @stagemodelonly
846   * @since 9
847   */
848  /**
849   * Type of onSave result.
850   *
851   * @enum { number }
852   * @syscap SystemCapability.Ability.AbilityRuntime.Core
853   * @stagemodelonly
854   * @atomicservice
855   * @since 11
856   */
857  export enum OnSaveResult {
858    /**
859     * Always agree to save the state.
860     *
861     * @syscap SystemCapability.Ability.AbilityRuntime.Core
862     * @stagemodelonly
863     * @since 9
864     */
865    /**
866     * Always agree to save the state.
867     *
868     * @syscap SystemCapability.Ability.AbilityRuntime.Core
869     * @stagemodelonly
870     * @atomicservice
871     * @since 11
872     */
873    ALL_AGREE = 0,
874
875    /**
876     * Refuse to migrate the saved state.
877     *
878     * @syscap SystemCapability.Ability.AbilityRuntime.Core
879     * @stagemodelonly
880     * @since 9
881     */
882    /**
883     * Refuse to migrate the saved state.
884     *
885     * @syscap SystemCapability.Ability.AbilityRuntime.Core
886     * @stagemodelonly
887     * @atomicservice
888     * @since 11
889     */
890    CONTINUATION_REJECT = 1,
891
892    /**
893     * Migration mismatch.
894     *
895     * @syscap SystemCapability.Ability.AbilityRuntime.Core
896     * @stagemodelonly
897     * @since 9
898     */
899    /**
900     * Migration mismatch.
901     *
902     * @syscap SystemCapability.Ability.AbilityRuntime.Core
903     * @stagemodelonly
904     * @atomicservice
905     * @since 11
906     */
907    CONTINUATION_MISMATCH = 2,
908
909    /**
910     * Agree to restore the saved state.
911     *
912     * @syscap SystemCapability.Ability.AbilityRuntime.Core
913     * @stagemodelonly
914     * @since 9
915     */
916    /**
917     * Agree to restore the saved state.
918     *
919     * @syscap SystemCapability.Ability.AbilityRuntime.Core
920     * @stagemodelonly
921     * @atomicservice
922     * @since 11
923     */
924    RECOVERY_AGREE = 3,
925
926    /**
927     * Refuse to restore the saved state.
928     *
929     * @syscap SystemCapability.Ability.AbilityRuntime.Core
930     * @stagemodelonly
931     * @since 9
932     */
933    /**
934     * Refuse to restore the saved state.
935     *
936     * @syscap SystemCapability.Ability.AbilityRuntime.Core
937     * @stagemodelonly
938     * @atomicservice
939     * @since 11
940     */
941    RECOVERY_REJECT = 4,
942
943    /**
944     * Always refuses to save the state.
945     *
946     * @syscap SystemCapability.Ability.AbilityRuntime.Core
947     * @stagemodelonly
948     * @since 9
949     */
950    /**
951     * Always refuses to save the state.
952     *
953     * @syscap SystemCapability.Ability.AbilityRuntime.Core
954     * @stagemodelonly
955     * @atomicservice
956     * @since 11
957     */
958    ALL_REJECT
959  }
960
961  /**
962   * Type of save state.
963   *
964   * @enum { number }
965   * @syscap SystemCapability.Ability.AbilityRuntime.Core
966   * @stagemodelonly
967   * @since 9
968   */
969  /**
970   * Type of save state.
971   *
972   * @enum { number }
973   * @syscap SystemCapability.Ability.AbilityRuntime.Core
974   * @stagemodelonly
975   * @atomicservice
976   * @since 11
977   */
978  export enum StateType {
979    /**
980     * Migrate and save the state.
981     *
982     * @syscap SystemCapability.Ability.AbilityRuntime.Core
983     * @stagemodelonly
984     * @since 9
985     */
986    /**
987     * Migrate and save the state.
988     *
989     * @syscap SystemCapability.Ability.AbilityRuntime.Core
990     * @stagemodelonly
991     * @atomicservice
992     * @since 11
993     */
994    CONTINUATION = 0,
995
996    /**
997     * App recovery to restore the saved state.
998     *
999     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1000     * @stagemodelonly
1001     * @since 9
1002     */
1003    /**
1004     * App recovery to restore the saved state.
1005     *
1006     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1007     * @stagemodelonly
1008     * @atomicservice
1009     * @since 11
1010     */
1011    APP_RECOVERY = 1
1012  }
1013
1014  /**
1015   * Continue state.
1016   *
1017   * @enum { number }
1018   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1019   * @stagemodelonly
1020   * @since 10
1021   */
1022  /**
1023   * Continue state.
1024   *
1025   * @enum { number }
1026   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1027   * @stagemodelonly
1028   * @atomicservice
1029   * @since 11
1030   */
1031  export enum ContinueState {
1032    /**
1033     * Mission continuable active.
1034     *
1035     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1036     * @stagemodelonly
1037     * @since 10
1038     */
1039    /**
1040     * Mission continuable inactive.
1041     *
1042     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1043     * @stagemodelonly
1044     * @atomicservice
1045     * @since 11
1046     */
1047    ACTIVE = 0,
1048
1049    /**
1050     * Mission continuable inactive.
1051     *
1052     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1053     * @stagemodelonly
1054     * @since 10
1055     */
1056    /**
1057     * Mission continuable inactive.
1058     *
1059     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1060     * @stagemodelonly
1061     * @atomicservice
1062     * @since 11
1063     */
1064    INACTIVE = 1
1065  }
1066
1067  /**
1068   * Type of collaborate result.
1069   *
1070   * @enum { number }
1071   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1072   * @stagemodelonly
1073   * @since 18
1074   */
1075  export enum CollaborateResult {
1076    /**
1077     * Accept to the result of Ability collaborate.
1078     *
1079     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1080     * @stagemodelonly
1081     * @since 18
1082     */
1083    ACCEPT = 0,
1084
1085    /**
1086     * Reject to the result of Ability collaborate.
1087     *
1088     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1089     * @stagemodelonly
1090     * @since 18
1091     */
1092    REJECT = 1,
1093  }
1094
1095  /**
1096   * PrepareTerminateAction indicates what to do prior to terminating process.
1097   *
1098   * @enum { number }
1099   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1100   * @stagemodelonly
1101   * @atomicservice
1102   * @since 15
1103   */
1104  export enum PrepareTermination {
1105    /**
1106     * Terminate process immediately.
1107     *
1108     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1109     * @stagemodelonly
1110     * @atomicservice
1111     * @since 15
1112     */
1113    TERMINATE_IMMEDIATELY = 0,
1114
1115    /**
1116     * Cancel terminate.
1117     *
1118     * @syscap SystemCapability.Ability.AbilityRuntime.Core
1119     * @stagemodelonly
1120     * @atomicservice
1121     * @since 15
1122     */
1123    CANCEL = 1
1124  }
1125}
1126
1127export default AbilityConstant;
1128