xref: /haiku/docs/user/storage/AppFileInfo.dox (revision f73f5d4c42a01ece688cbb57b5d332cc0f68b2c6)
1/*
2 * Copyright 2011 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		John Scipione, jscipione@gmail.com
7 *		Ingo Weinhold, bonefish@users.sf.net
8 *
9 * Corresponds to:
10 *		headers/os/storage/AppFileInfo.h	 rev 42274
11 *		src/kits/storage/AppFileInfo.cpp	 rev 42274
12 */
13
14
15/*!
16	\file AppFileInfo.h
17	\ingroup storage
18	\ingroup libbe
19	\brief Provides the BAppFileInfo class.
20*/
21
22
23/*!
24	\class BAppFileInfo
25	\ingroup storage
26	\ingroup libbe
27	\brief Provides access to the metadata associated with executables,
28		   libraries and add-ons.
29
30	The BAppFileInfo class allows for information about an executable or
31	add-on to be accessed or set. Information about an executable that can be
32	accessed include the signature, catalog entry, supported MIME types,
33	application flags, icon(s), and version info.
34
35	You should initialize the BAppFileInfo with a BFile object that represents
36	the executable or add-on that you want to access. If you only want to read
37	metadata from the file you do not have to open it for reading. However, if
38	you also want to write metadata then you should open the BFile for writing.
39
40	To associate a BFile with a BAppFileInfo object you can either pass the
41	BFile object into the constructor or you can use the empty constructor and
42	then use the SetTo() method to set the BFile to the BAppFileInfo object.
43
44	When accessing information from a BFileInfo object it will first look in the
45	attributes of the BFile. If the information is not found then the BFileInfo
46	object will next look at the resource of the BFile. You can tell the
47	BFileInfo object to look only in the attributes or resources with the
48	SetInfoLocation() method.
49*/
50
51
52/*!
53	\fn BAppFileInfo::BAppFileInfo()
54	\brief Creates an uninitialized BAppFileInfo object.
55*/
56
57
58/*!
59	\fn BAppFileInfo::BAppFileInfo(BFile* file)
60	\brief Creates an BAppFileInfo object and initializes it to the supplied
61		file.
62
63	The caller retains ownership of the supplied BFile object. It must not
64	be deleted during the life time of the BAppFileInfo. It is not deleted
65	when the BAppFileInfo is destroyed.
66
67	\param file The BFile object that the BAppFileInfo object shall be
68		initialized to.
69*/
70
71
72/*!
73	\fn BAppFileInfo::~BAppFileInfo()
74	\brief Frees all resources associated with this object.
75
76	The supplied BFile object is not deleted if one is specified.
77*/
78
79
80/*!
81	\fn status_t BAppFileInfo::SetTo(BFile *file)
82	\brief Initializes the BAppFileInfo to the supplied file.
83
84	The caller retains ownership of the supplied BFile object. It must not
85	be deleted during the life time of the BAppFileInfo. The BFile object
86	is not deleted when the BAppFileInfo is destroyed.
87
88	\param file The BFile object that the BAppFileInfo object shall be
89		initialized to.
90
91	\returns an status code.
92	\retval B_OK Everything went fine.
93	\retval B_BAD_VALUE \c NULL \a file or \a file is not properly initialized.
94*/
95
96
97/*!
98	\name MIME Type
99*/
100
101
102//! @{
103
104
105/*!
106	\fn status_t BAppFileInfo::GetType(char *type) const
107	\brief Gets the MIME type of the associated file.
108
109	\param type A pointer to a pre-allocated character buffer of size
110		   \c B_MIME_TYPE_LENGTH or larger into which the MIME type of the
111		   file will be written.
112
113	\returns A status code.
114	\retval B_OK Everything went fine.
115	\retval B_NO_INIT The object is not properly initialized.
116	\retval B_BAD_VALUE \c NULL \a type or the type string stored in the
117		attribute/resources is longer than \c B_MIME_TYPE_LENGTH.
118	\retval B_BAD_TYPE The attribute/resources the type string is stored in
119		has the wrong type.
120	\retval B_ENTRY_NOT_FOUND No type is set on the file.
121*/
122
123
124/*!
125	\fn status_t BAppFileInfo::SetType(const char* type)
126	\brief Sets the MIME type of the associated file.
127
128	If \a type is \c NULL if the file's MIME type is unset.
129
130	\param type The MIME type to be assigned to the file. It must not be
131		longer than \c B_MIME_TYPE_LENGTH (including the terminating null).
132		The MIME type may be \c NULL.
133
134	\returns a status code.
135	\retval B_OK Everything went fine.
136	\retval B_NO_INIT The object is not properly initialized.
137	\retval B_BAD_VALUE \a type is longer than \c B_MIME_TYPE_LENGTH.
138*/
139
140
141//! @}
142
143
144/*!
145	\name Signature
146*/
147
148
149//! @{
150
151
152/*!
153	\fn status_t BAppFileInfo::GetSignature(char* signature) const
154	\brief Gets the application signature of the associated file.
155
156	\param signature A pointer to a pre-allocated character buffer of size
157		   \c B_MIME_TYPE_LENGTH or larger into which the application
158		   signature of the file will be written.
159
160	\returns a status code.
161	\retval B_OK Everything went fine.
162	\retval B_NO_INIT The object is not properly initialized.
163	\retval B_BAD_VALUE \c NULL \a signature or the signature stored in the
164		attribute/resources is longer than \c B_MIME_TYPE_LENGTH.
165	\retval B_BAD_TYPE The attribute/resources the signature is stored in have
166		the wrong type.
167	\retval B_ENTRY_NOT_FOUND No signature is set on the file.
168*/
169
170
171/*!
172	\fn status_t BAppFileInfo::SetSignature(const char* signature)
173	\brief Sets the application signature of the associated file.
174
175	If \a signature is \c NULL the file's application signature is unset.
176
177	\param signature The application signature to be assigned to the file.
178		Must not be longer than \c B_MIME_TYPE_LENGTH (including the
179		terminating \c NUL). The \a signature may be \c NULL.
180
181	\returns a status code.
182	\retval B_OK Everything went fine.
183	\retval B_NO_INIT The object is not properly initialized.
184	\retval B_BAD_VALUE \a signature is longer than \c B_MIME_TYPE_LENGTH.
185*/
186
187
188//! @}
189
190
191/*!
192	\name Catalog Entry
193*/
194
195
196//! @{
197
198
199/*!
200	\fn status_t BAppFileInfo::GetCatalogEntry(char *catalogEntry) const
201	\brief Gets the catalog entry of the associated file used for localization.
202
203	\param catalogEntry A pointer to a pre-allocated character buffer of size
204		   \c B_MIME_TYPE_LENGTH * 3 or larger into which the catalog entry
205		   of the file will be written.
206
207	\returns a status code.
208	\retval B_OK Everything went fine.
209	\retval B_NO_INIT The object is not properly initialized.
210	\retval B_BAD_VALUE \c NULL \a catalogEntry or the entry stored in the
211		attribute/resources is longer than \c B_MIME_TYPE_LENGTH * 3.
212	\retval B_BAD_TYPE The attribute/resources the entry is stored in have
213		the wrong type.
214	\retval B_ENTRY_NOT_FOUND No catalog entry is set on the file.
215*/
216
217
218/*!
219	\fn status_t BAppFileInfo::SetCatalogEntry(const char* catalogEntry)
220	\brief Sets the catalog entry of the associated file used for localization.
221
222	If \a catalogEntry is \c NULL the file's catalog entry is unset.
223
224	\param catalogEntry The catalog entry to be assigned to the file.
225		Of the form "x-vnd.Haiku-app:context:name". Must not be longer than
226		\c B_MIME_TYPE_LENGTH * 3 (including the terminating \c NUL).
227		The \a catalogEntry may be \c NULL.
228
229	\returns a status code.
230	\retval B_OK Everything went fine.
231	\retval B_NO_INIT The object is not properly initialized.
232	\retval B_BAD_VALUE \a catalogEntry is longer than
233		\c B_MIME_TYPE_LENGTH * 3.
234*/
235
236
237//! @}
238
239
240/*!
241	\name Application Flags
242*/
243
244
245//! @{
246
247
248/*!
249	\fn status_t BAppFileInfo::GetAppFlags(uint32* flags) const
250	\brief Gets the application \a flags of the associated file.
251
252	\param flags A pointer to a pre-allocated \c uint32 into which the
253		application flags of the file are written.
254
255	\returns A status code.
256	\retval B_OK Everything went fine.
257	\retval B_NO_INIT The object is not properly initialized.
258	\retval B_BAD_VALUE \c NULL \a flags.
259	\retval B_BAD_TYPE The attribute/resources the flags are stored in have
260		the wrong type.
261	\retval B_ENTRY_NOT_FOUND No application flags are set on the file.
262*/
263
264
265/*!
266	\fn status_t BAppFileInfo::SetAppFlags(uint32 flags)
267	\brief Sets the application \a flags of the associated file.
268
269	\param flags The application \a flags to be assigned to the file.
270
271	\returns A status code.
272	\retval B_OK Everything went fine.
273	\retval B_NO_INIT The object was not properly initialized.
274*/
275
276
277/*!
278	\fn status_t BAppFileInfo::RemoveAppFlags()
279	\brief Removes the application flags from the associated file.
280
281	\returns A status code.
282	\retval B_OK Everything went fine.
283	\retval B_NO_INIT The object was not properly initialized.
284*/
285
286
287//! @}
288
289
290/*!
291	\name Supported MIME Types
292*/
293
294
295//! @{
296
297
298/*!
299	\fn status_t BAppFileInfo::GetSupportedTypes(BMessage* types) const
300	\brief Gets the MIME types supported by the application.
301
302	The supported MIME types are added to a field "types" of type
303	\c B_STRING_TYPE in \a types.
304
305	\param types A pointer to a pre-allocated BMessage into which the
306		MIME types supported by the application will be written.
307
308	\returns A status code.
309	\retval B_OK Everything went fine.
310	\retval B_NO_INIT The object is not properly initialized.
311	\retval B_BAD_VALUE \c NULL \a types.
312	\retval B_BAD_TYPE The attribute/resources that the supported types
313		are stored in have the wrong type.
314	\retval B_ENTRY_NOT_FOUND No supported types are set on the file.
315*/
316
317
318/*!
319	\fn status_t BAppFileInfo::SetSupportedTypes(const BMessage* types,
320		bool syncAll)
321	\brief Sets the MIME types that are supported by the application and allows
322		you to specify whether or not the no longer supported types shall be
323		updated as well.
324
325	If \a types is \c NULL then the application's supported types are unset.
326
327	The supported MIME types must be stored in a field "types" of type
328	\c B_STRING_TYPE in \a types.
329
330	The method informs the registrar about this news.
331	For each supported type the result of BMimeType::GetSupportingApps()
332	will afterwards include the signature of this application. That is,
333	the application file needs to have a signature set.
334
335	\a syncAll specifies whether the no longer supported types shall be
336	updated as well, i.e. whether or not this application shall be removed
337	from the list of supporting applications.
338
339	\param types The supported types to be assigned to the file.
340		May be \c NULL.
341	\param syncAll \c true to also synchronize the no-longer supported
342		types, \c false otherwise.
343
344	\returns A status code.
345	\retval B_OK Everything went fine.
346	\retval B_NO_INIT The object is not properly initialized.
347*/
348
349
350/*!
351	\fn status_t BAppFileInfo::SetSupportedTypes(const BMessage* types)
352	\brief Sets the MIME types supported by the application.
353
354	This method is a short-hand for SetSupportedTypes(types, false).
355	\see SetSupportedType(const BMessage*, bool) for detailed information.
356
357	\param types The supported types to be assigned to the file.
358		May be \c NULL.
359	\returns A status code.
360	\retval B_OK Everything went fine.
361	\retval B_NO_INIT The object is not properly initialized.
362*/
363
364
365/*!
366	\fn bool BAppFileInfo::IsSupportedType(const char* type) const
367	\brief Returns whether the application supports the supplied MIME type.
368
369	If the application supports the wildcard type "application/octet-stream"
370	then this method returns \c true for any MIME type.
371
372	\param type The MIME type in question.
373
374	\returns \c true if \a type is a valid MIME type and it is supported by
375		the application, \c false otherwise.
376*/
377
378
379/*!
380	\fn bool BAppFileInfo::Supports(BMimeType* type) const
381	\brief Returns whether the application supports the supplied MIME type
382		explicitly.
383
384	Unlike IsSupportedType(), this method returns \c true, only if the type
385	is explicitly supported, regardless of whether it supports
386	"application/octet-stream".
387
388	\param type The MIME type in question.
389
390	\returns \c true if \a type is a valid MIME type and it is explicitly
391		supported by the application, \c false otherwise.
392*/
393
394
395//! @}
396
397
398/*!
399	\name Application Icon
400*/
401
402
403//! @{
404
405
406/*!
407	\fn status_t BAppFileInfo::GetIcon(BBitmap* icon, icon_size which) const
408	\brief Gets the icon of the associated file and puts it into a pre-allocated
409		   BBitmap.
410
411	\param icon A pointer to a pre-allocated BBitmap of the correct dimension
412		to store the requested icon (16x16 for the \c B_MINI_ICON and 32x32
413		for the \c B_LARGE_ICON).
414	\param which Specifies the size of the icon to be retrieved:
415		\c B_MINI_ICON for the mini and \c B_LARGE_ICON for the large icon.
416		For HVIF icons this parameter has no effect.
417
418	\returns A status code.
419	\retval B_OK Everything went fine.
420	\retval B_NO_INIT The object is not properly initialized.
421	\retval B_BAD_VALUE \c NULL \a icon, unsupported icon size \a which or
422		bitmap dimensions (\a icon) and icon size (\a which) do not match.
423*/
424
425
426/*!
427	\fn status_t BAppFileInfo::GetIcon(uint8** data, size_t* size) const
428	\brief Gets the icon of the associated file and puts it into a buffer.
429
430	\param data The pointer in which the flat icon data will be returned.
431	\param size The pointer in which the size of the data found will be
432		returned.
433
434	\returns A status code.
435	\retval B_OK Everything went fine.
436	\retval B_NO_INIT The object is not properly initialized.
437	\retval B_BAD_VALUE \c NULL \a data or \c NULL size.
438*/
439
440
441/*!
442	\fn status_t BAppFileInfo::SetIcon(const BBitmap* icon, icon_size which)
443	\brief Sets the icon of the associated file from a BBitmap.
444
445	If \a icon is \c NULL then the icon of the file is unset.
446
447	\param icon A pointer to the BBitmap containing the icon to be set.
448		May be \c NULL to specify no icon.
449	\param which Specifies the size of the icon to be set: \c B_MINI_ICON for
450		16x16 mini icon and \c B_LARGE_ICON for the 32x32 large icon.
451		For HVIF icons this parameter has no effect.
452
453	\returns A status code.
454	\retval B_OK Everything went fine.
455	\retval B_NO_INIT The object is not properly initialized.
456	\retval B_BAD_VALUE Unknown icon size \a which or bitmap dimensions
457		(\a icon) and icon size (\a which) do not match.
458*/
459
460
461/*!
462	\fn status_t BAppFileInfo::SetIcon(const uint8* data, size_t size)
463	\brief Sets the icon of the associated file from a buffer.
464
465	If \a data is \c NULL then the icon of the file is unset.
466
467	\param data A pointer to the data buffer containing the vector icon
468		   to be set. May be \c NULL.
469	\param size Specifies the size of buffer pointed to by \a data.
470
471	\returns A status code.
472	\retval B_OK Everything went fine.
473	\retval B_NO_INIT The object is not properly initialized.
474	\retval B_BAD_VALUE \c NULL data.
475*/
476
477
478/*!
479	\fn status_t BAppFileInfo::GetIconForType(const char* type, BBitmap* icon,
480		icon_size size) const
481	\brief Gets the icon the application provides for a given MIME type and
482		puts it into a BBitmap.
483
484	\note If \a type is \c NULL, the application's icon is retrieved.
485
486	\param type The MIME type in question. May be \c NULL.
487	\param icon A pointer to a pre-allocated BBitmap of the correct dimension
488		to store the requested icon (16x16 for the mini and 32x32 for the
489		large icon).
490	\param size Specifies the size of the icon to be retrieved:
491		\c B_MINI_ICON for the mini and \c B_LARGE_ICON for the large icon.
492
493	\returns A status code.
494	\retval B_OK Everything went fine.
495	\retval B_NO_INIT The object is not properly initialized.
496	\retval B_BAD_VALUE \c NULL \a icon, unsupported icon size
497		\a which or bitmap dimensions (\a icon) and icon size (\a which) do
498		not match.
499*/
500
501
502/*!
503	\fn status_t BAppFileInfo::GetIconForType(const char* type, uint8** data,
504		size_t* size) const
505	\brief Gets the icon the application provides for a given MIME type and
506		puts it into a buffer.
507
508	\note If \a type is set to \c NULL the the application's icon is retrieved.
509
510	\param type The MIME type in question. May be \c NULL.
511	\param data A pointer in which the icon data will be returned. When you
512	are done with the data, you should use free() to deallocate it.
513	\param size A pointer in which the size of the retrieved data is returned.
514
515	\returns A status code.
516	\retval B_OK Everything went fine.
517	\retval B_NO_INIT The object is not properly initialized.
518	\retval B_BAD_VALUE \c NULL \a data and/or \a size. Or the supplied
519		\a type is not a valid MIME type.
520*/
521
522
523/*!
524	\fn status_t BAppFileInfo::SetIconForType(const char* type,
525		const BBitmap* icon, icon_size which)
526	\brief Sets the icon the application provides for a given MIME type from a
527		BBitmap.
528
529	\note If \a type is \c NULL then the icon is set.
530	\note If \a icon is \c NULL then the icon is unset.
531
532	If the file has a signature, then the icon is also set on the MIME type.
533	If the type for the signature has not been installed yet, it is installed
534	before.
535
536	\param type The MIME type in question. May be \c NULL.
537	\param icon A pointer to the BBitmap containing the icon to be set.
538		May be \c NULL.
539	\param which Specifies the size of the icon to be set: \c B_MINI_ICON
540		for the mini and \c B_LARGE_ICON for the large icon.
541
542	\returns A status code.
543	\retval B_OK Everything went fine.
544	\retval B_NO_INIT The object is not properly initialized.
545	\retval B_BAD_VALUE Either the icon size \a which is unknown,
546		the bitmap dimensions (\a icon) and icon size (\a which) do not
547		match, or the provided \a type is not a valid MIME type.
548*/
549
550
551/*!
552	\fn status_t BAppFileInfo::SetIconForType(const char* type,
553		const uint8* data, size_t size)
554	\brief Sets the icon the application provides for a given MIME type from a
555		buffer.
556
557	\note If \a type is \c NULL then the icon is set.
558	\note If \a data is \c NULL then the icon is unset.
559
560	If the file has a signature, then the icon is also set on the MIME type.
561	If the type for the signature has not been installed yet, it is
562	installed before.
563
564	\param type The MIME type in question. May be \c NULL.
565	\param data A pointer to the data containing the icon to be set.
566		   May be \c NULL.
567	\param size Specifies the size of buffer provided in \a data.
568
569	\returns A status code.
570	\retval B_OK Everything went fine.
571	\retval B_NO_INIT The object is not properly initialized.
572	\retval B_BAD_VALUE The provided \a type is not a valid MIME type.
573*/
574
575
576//! @}
577
578
579/*!
580	\name Version Info
581*/
582
583
584//! @{
585
586
587/*!
588	\fn status_t BAppFileInfo::GetVersionInfo(version_info* info,
589		version_kind kind) const
590	\brief Gets the version info of the associated file.
591
592	\param info A pointer to a pre-allocated version_info structure into
593		which the version info should be written.
594	\param kind Specifies the kind of the version info to be retrieved:
595		- \c B_APP_VERSION_KIND for the application's version info and
596		- \c B_SYSTEM_VERSION_KIND for the suite's info the application
597			 belongs to.
598
599	\returns A status code.
600	\retval B_OK Everything went fine.
601	\retval B_NO_INIT The object is not properly initialized.
602	\retval B_BAD_VALUE \c NULL \a info.
603*/
604
605
606/*!
607	\fn status_t BAppFileInfo::SetVersionInfo(const version_info* info,
608		version_kind kind)
609	\brief Sets the version info of the associated file.
610
611	\note If \a info is set to \c NULL then the file's version info is unset.
612
613	\param info The version info to be set. May be \c NULL.
614	\param kind Specifies kind of version info to be set:
615		- \c B_APP_VERSION_KIND for the application's version info and
616		- \c B_SYSTEM_VERSION_KIND for the suite's info the application
617			 belongs to.
618
619	\returns A status code.
620	\retval B_OK Everything went fine.
621	\retval B_NO_INIT The object is not properly initialized.
622*/
623
624
625//! @}
626
627
628/*!
629	\name Attributes/Resources
630*/
631
632
633//! @{
634
635
636/*!
637	\fn void BAppFileInfo::SetInfoLocation(info_location location)
638	\brief Specifies the location where the metadata shall be stored.
639
640	The options for \a location are:
641		- \c B_USE_ATTRIBUTES: Store the data in the attributes.
642		- \c B_USE_RESOURCES: Store the data in the resources.
643		- \c B_USE_BOTH_LOCATIONS: Store the data in attributes and resources.
644
645	\param location The location where the metadata shall be stored.
646*/
647
648
649/*!
650	\fn bool BAppFileInfo::IsUsingAttributes() const
651	\brief Returns whether the object (also) stores the metadata in the
652		   attributes of the associated file.
653
654	\returns \c true if the metadata are (also) stored in the file's
655		attributes, \c false otherwise.
656*/
657
658
659/*!
660	\fn bool BAppFileInfo::IsUsingResources() const
661	\brief Returns whether the object (also) stores the metadata in the
662		   resources of the associated file.
663
664	\returns \c true if the metadata are (also) stored in the file's
665		resources, \c false otherwise.
666*/
667
668
669//! @}
670
671
672/*!
673	\fn BAppFileInfo & BAppFileInfo::operator=(const BAppFileInfo &)
674	\brief Privatized assignment operator to prevent usage.
675*/
676
677
678/*!
679	\fn BAppFileInfo::BAppFileInfo(const BAppFileInfo &)
680	\brief Privatized copy constructor to prevent usage.
681*/
682
683
684/*!
685	\fn status_t BAppFileInfo::GetMetaMime(BMimeType* meta) const
686	\brief Initializes a BMimeType to the signature of the associated file.
687
688	\warning The parameter \a meta is not checked.
689
690	\param meta A pointer to a pre-allocated BMimeType that shall be
691		   initialized to the signature of the associated file.
692
693	\returns A status code.
694	\retval B_OK Everything went fine.
695	\retval B_BAD_VALUE \c NULL \a meta
696	\retval B_ENTRY_NOT_FOUND The file has not signature or the signature is
697			(not installed in the MIME database.) no valid MIME string.
698*/
699
700
701/*!
702	\fn status_t BAppFileInfo::_ReadData(const char* name, int32 id,
703		type_code type, void* buffer, size_t bufferSize,
704		size_t &bytesRead, void** allocatedBuffer) const
705	\brief Reads data from an attribute or resource.
706
707	\note The data is read from the location specified by \a fWhere.
708
709	\warning The object must be properly initialized. The parameters are
710		\b NOT checked.
711
712	\param name The name of the attribute/resource to be read.
713	\param id The resource ID of the resource to be read. It is ignored
714		   when < 0.
715	\param type The type of the attribute/resource to be read.
716	\param buffer A pre-allocated buffer for the data to be read.
717	\param bufferSize The size of the supplied buffer.
718	\param bytesRead A reference parameter, set to the number of bytes
719		   actually read.
720	\param allocatedBuffer If not \c NULL, the method allocates a buffer
721		   large enough too store the whole data and writes a pointer to it
722		   into this variable. If \c NULL, the supplied buffer is used.
723
724	\returns A status code.
725	\retval B_OK Everything went fine.
726	\retval B_ENTRY_NOT_FOUND The entry was not found.
727	\retval B_NO_MEMORY Ran out of memory allocating the buffer.
728	\retval B_BAD_VALUE \a type did not match.
729*/
730
731
732/*!
733	\fn status_t BAppFileInfo::_WriteData(const char* name, int32 id,
734		type_code type, const void* buffer, size_t bufferSize, bool findID)
735	\brief Writes data to an attribute or resource.
736
737	\note The data is written to the location(s) specified by \a fWhere.
738
739	\warning The object must be properly initialized. The parameters are
740		\b NOT checked.
741
742	\param name The name of the attribute/resource to be written.
743	\param id The resource ID of the resource to be written.
744	\param type The type of the attribute/resource to be written.
745	\param buffer A buffer containing the data to be written.
746	\param bufferSize The size of the supplied buffer.
747	\param findID If set to \c true use the ID that is already assigned to the
748		   \a name / \a type pair or take the first unused ID >= \a id.
749		   If \c false, \a id is used.
750
751	\returns A status code.
752	\retval B_OK Everything went fine.
753	\retval B_ERROR An error occurred while trying to write the data.
754*/
755
756
757/*!
758	\fn status_t BAppFileInfo::_RemoveData(const char* name, type_code type)
759	\brief Removes an attribute or resource.
760
761	\note The removal location is specified by \a fWhere.
762
763	\warning The object must be properly initialized. The parameters are
764		\b NOT checked.
765
766	\param name The name of the attribute/resource to be remove.
767	\param type The type of the attribute/resource to be removed.
768
769	\returns A status code.
770	\retval B_OK Everything went fine.
771	\retval B_NO_INIT Not using attributes and not using resources.
772	\retval B_ENTRY_NOT_FOUND The attribute or resource was not found.
773*/
774