-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathIBackupHelper.xml
More file actions
240 lines (240 loc) · 18 KB
/
Copy pathIBackupHelper.xml
File metadata and controls
240 lines (240 loc) · 18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<Type Name="IBackupHelper" FullName="Android.App.Backup.IBackupHelper">
<TypeSignature Language="C#" Value="public interface IBackupHelper : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IBackupHelper implements class Android.Runtime.IJavaObject, class Java.Interop.IJavaPeerable, class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:Android.App.Backup.IBackupHelper" />
<TypeSignature Language="F#" Value="type IBackupHelper = interface
 interface IJavaObject
 interface IDisposable
 interface IJavaPeerable" />
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>Android.Runtime.IJavaObject</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Interop.IJavaPeerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("android/app/backup/BackupHelper", "", "Android.App.Backup.IBackupHelperInvoker")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("android/app/backup/BackupHelper", "", "Android.App.Backup.IBackupHelperInvoker")>]</AttributeName>
</Attribute>
</Attributes>
<Docs since="8">
<summary>Defines the calling interface that <c>BackupAgentHelper</c> uses
when dispatching backup and restore operations to the installed helpers.</summary>
<remarks>
<para>Defines the calling interface that <c>BackupAgentHelper</c> uses
when dispatching backup and restore operations to the installed helpers.
Applications can define and install their own helpers as well as using those
provided as part of the Android framework.</para>
<para>Although multiple helper objects may be installed simultaneously, each helper
is responsible only for handling its own data, and will not see entities
created by other components within the backup system. Invocations of multiple
helpers are performed sequentially by the <c>BackupAgentHelper</c>, with each
helper given a chance to access its own saved state from within the state record
produced during the previous backup operation.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/app/backup/BackupHelper" title="Reference documentation">Java documentation for <code>android.app.backup.BackupHelper</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 8" />
</Docs>
<Members>
<Member MemberName="PerformBackup">
<MemberSignature Language="C#" Value="public void PerformBackup (Android.OS.ParcelFileDescriptor? oldState, Android.App.Backup.BackupDataOutput? data, Android.OS.ParcelFileDescriptor? newState);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void PerformBackup(class Android.OS.ParcelFileDescriptor oldState, class Android.App.Backup.BackupDataOutput data, class Android.OS.ParcelFileDescriptor newState) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.App.Backup.IBackupHelper.PerformBackup(Android.OS.ParcelFileDescriptor,Android.App.Backup.BackupDataOutput,Android.OS.ParcelFileDescriptor)" />
<MemberSignature Language="F#" Value="abstract member PerformBackup : Android.OS.ParcelFileDescriptor * Android.App.Backup.BackupDataOutput * Android.OS.ParcelFileDescriptor -> unit" Usage="iBackupHelper.PerformBackup (oldState, data, newState)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("performBackup", "(Landroid/os/ParcelFileDescriptor;Landroid/app/backup/BackupDataOutput;Landroid/os/ParcelFileDescriptor;)V", "GetPerformBackup_Landroid_os_ParcelFileDescriptor_Landroid_app_backup_BackupDataOutput_Landroid_os_ParcelFileDescriptor_Handler:Android.App.Backup.IBackupHelperInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("performBackup", "(Landroid/os/ParcelFileDescriptor;Landroid/app/backup/BackupDataOutput;Landroid/os/ParcelFileDescriptor;)V", "GetPerformBackup_Landroid_os_ParcelFileDescriptor_Landroid_app_backup_BackupDataOutput_Landroid_os_ParcelFileDescriptor_Handler:Android.App.Backup.IBackupHelperInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="oldState" Type="Android.OS.ParcelFileDescriptor" />
<Parameter Name="data" Type="Android.App.Backup.BackupDataOutput" />
<Parameter Name="newState" Type="Android.OS.ParcelFileDescriptor" />
</Parameters>
<Docs>
<param name="oldState">An open, read-only <c>android.os.ParcelFileDescriptor</c> pointing to the
last backup state provided by the application. May be
<c>null</c>, in which case no prior state is being
provided and the application should perform a full backup.</param>
<param name="data">An open, read/write <c>BackupDataOutput</c>
pointing to the backup data destination.
Typically the application will use backup helper classes to
write to this file.</param>
<param name="newState">An open, read/write <c>android.os.ParcelFileDescriptor</c> pointing to an
empty file. The application should record the final backup
state here after writing the requested data to the <c>data</c>
output stream.</param>
<summary>Based on <c>oldState</c>, determine what application content
needs to be backed up, write it to <c>data</c>, and fill in
<c>newState</c> with the complete state as it exists now.</summary>
<remarks>
<para>Based on <c>oldState</c>, determine what application content
needs to be backed up, write it to <c>data</c>, and fill in
<c>newState</c> with the complete state as it exists now.</para>
<para>Implementing this method is much like implementing
<c>BackupAgent#onBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)
onBackup()</c> &mdash; the method parameters are the same. When this method is invoked the
<c>oldState</c> descriptor points to the beginning of the state data
written during this helper's previous backup operation, and the <c>newState</c>
descriptor points to the file location at which the helper should write its
new state after performing the backup operation.</para>
<para><strong>Note:</strong> The helper should not close or seek either the <c>oldState</c> or
the <c>newState</c> file descriptors. It is essential that when reading the helper's
saved state from the <c>oldState</c> file, no extra content is consumed beyond
what was stored by this helper. If more old state data is read, even accidentally,
it will make it impossible for additional helpers that may be invoked after this one
to properly reconstruct their prior state.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/app/backup/BackupHelper#performBackup(android.os.ParcelFileDescriptor,%20android.app.backup.BackupDataOutput,%20android.os.ParcelFileDescriptor)" title="Reference documentation">Java documentation for <code>android.app.backup.BackupHelper.performBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 8" />
</Docs>
</Member>
<Member MemberName="RestoreEntity">
<MemberSignature Language="C#" Value="public void RestoreEntity (Android.App.Backup.BackupDataInputStream? data);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RestoreEntity(class Android.App.Backup.BackupDataInputStream data) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.App.Backup.IBackupHelper.RestoreEntity(Android.App.Backup.BackupDataInputStream)" />
<MemberSignature Language="F#" Value="abstract member RestoreEntity : Android.App.Backup.BackupDataInputStream -> unit" Usage="iBackupHelper.RestoreEntity data" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("restoreEntity", "(Landroid/app/backup/BackupDataInputStream;)V", "GetRestoreEntity_Landroid_app_backup_BackupDataInputStream_Handler:Android.App.Backup.IBackupHelperInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("restoreEntity", "(Landroid/app/backup/BackupDataInputStream;)V", "GetRestoreEntity_Landroid_app_backup_BackupDataInputStream_Handler:Android.App.Backup.IBackupHelperInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="data" Type="Android.App.Backup.BackupDataInputStream" />
</Parameters>
<Docs>
<param name="data">An open <c>BackupDataInputStream</c> from which the backup data can be read.</param>
<summary>Called by <c>android.app.backup.BackupAgentHelper BackupAgentHelper</c>
to restore a single entity from the restore data set.</summary>
<remarks>
<para>Called by <c>android.app.backup.BackupAgentHelper BackupAgentHelper</c>
to restore a single entity from the restore data set. This method will be
called for each entity in the data set that belongs to this handler.</para>
<para><strong>Note:</strong> Do not close the <c>data</c> stream. Do not read more than
<c>android.app.backup.BackupDataInputStream#size() size()</c> bytes from
<c>data</c>.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/app/backup/BackupHelper#restoreEntity(android.app.backup.BackupDataInputStream)" title="Reference documentation">Java documentation for <code>android.app.backup.BackupHelper.restoreEntity(android.app.backup.BackupDataInputStream)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 8" />
</Docs>
</Member>
<Member MemberName="WriteNewStateDescription">
<MemberSignature Language="C#" Value="public void WriteNewStateDescription (Android.OS.ParcelFileDescriptor? newState);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void WriteNewStateDescription(class Android.OS.ParcelFileDescriptor newState) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.App.Backup.IBackupHelper.WriteNewStateDescription(Android.OS.ParcelFileDescriptor)" />
<MemberSignature Language="F#" Value="abstract member WriteNewStateDescription : Android.OS.ParcelFileDescriptor -> unit" Usage="iBackupHelper.WriteNewStateDescription newState" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("writeNewStateDescription", "(Landroid/os/ParcelFileDescriptor;)V", "GetWriteNewStateDescription_Landroid_os_ParcelFileDescriptor_Handler:Android.App.Backup.IBackupHelperInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("writeNewStateDescription", "(Landroid/os/ParcelFileDescriptor;)V", "GetWriteNewStateDescription_Landroid_os_ParcelFileDescriptor_Handler:Android.App.Backup.IBackupHelperInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="newState" Type="Android.OS.ParcelFileDescriptor" />
</Parameters>
<Docs>
<param name="newState">A <c>android.os.ParcelFileDescriptor</c> to which the new state will be
written.</param>
<summary>Called by <c>android.app.backup.BackupAgentHelper BackupAgentHelper</c>
after a restore operation to write the backup state file corresponding to
the data as processed by the helper.</summary>
<remarks>
<para>Called by <c>android.app.backup.BackupAgentHelper BackupAgentHelper</c>
after a restore operation to write the backup state file corresponding to
the data as processed by the helper. The data written here will be
available to the helper during the next call to its
<c>#performBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)
performBackup()</c> method.</para>
<para>This method will be called even if the handler's
<c>#restoreEntity(BackupDataInputStream) restoreEntity()</c> method was never invoked during
the restore operation.</para>
<para><strong>Note:</strong> The helper should not close or seek the <c>newState</c>
file descriptor.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/app/backup/BackupHelper#writeNewStateDescription(android.os.ParcelFileDescriptor)" title="Reference documentation">Java documentation for <code>android.app.backup.BackupHelper.writeNewStateDescription(android.os.ParcelFileDescriptor)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 8" />
</Docs>
</Member>
</Members>
</Type>