Patch by Alex Wilson (minor changes by myself) related to the new archiving

features:
* Some cosmetic adjustments of the API, like using references instead of
  pointers, argument order, method names, etc.
* Added convenience template methods for archiving and unarchiving to BArchiver
  and BUnarchiver.
* BUnarchiver (respectively the private BUnarchiveManager) explicitly deals with
  object ownership, now. This is necessary since an error while unarchiving
  could leave an already unarchived object without owning object, which would
  result in it being leaked. The BUnarchiver::{Get,Find}Object() methods do now
  have an optional parameter to specify whether object ownership shall be
  transferred.
* Fixed incorrect header guard in headers/private/binary_compatibility/Global.h.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37538 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-07-16 16:49:42 +00:00
parent 6a78d35e85
commit b137ab3eb3
8 changed files with 421 additions and 190 deletions
@@ -4,7 +4,7 @@
* Distributed under the terms of the MIT License.
*/
#ifndef _BINARY_COMPATIBILITY_GLOBAL_H_
#define _BINARY_COMPATIBILITY__GLOBAL_H_
#define _BINARY_COMPATIBILITY_GLOBAL_H_
// method codes
@@ -24,7 +24,6 @@ enum {
PERFORM_CODE_GET_TOOL_TIP_AT = 1009,
// support kit
PERFORM_CODE_ALL_ARCHIVED = 1010,
PERFORM_CODE_ALL_UNARCHIVED = 1011
};
@@ -2,8 +2,8 @@
* Copyright 2010, Haiku, Inc.
* Distributed under the terms of the MIT License.
*/
#ifndef _BINARY_COMPATIBILITY_SUPPORT_H
#define _BINARY_COMPATIBILITY_SUPPORT_H
#ifndef _BINARY_COMPATIBILITY_SUPPORT_H_
#define _BINARY_COMPATIBILITY_SUPPORT_H_
#include <binary_compatibility/Global.h>
@@ -20,4 +20,4 @@ struct perform_data_all_archived {
status_t return_value;
};
#endif /* _BINARY_COMPATIBILITY_INTERFACE_H_ */
#endif /* _BINARY_COMPATIBILITY_SUPPORT_H_ */