2 * Copyright (c) 2007-2011 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef __ASL_STORE_H__
25 #define __ASL_STORE_H__
33 #include <Availability.h>
34 #include <os/object.h>
35 #include <os/object_private.h>
36 #include <TargetConditionals.h>
38 #define PATH_ASL_STORE (asl_filesystem_path(ASL_PLACE_DATABASE))
39 #define PATH_ASL_ARCHIVE (asl_filesystem_path(ASL_PLACE_ARCHIVE))
41 #define FILE_ASL_STORE_DATA "StoreData"
43 #define ASL_STORE_FLAG_NO_ACLS 0x00000001
44 #define ASL_STORE_FLAG_NO_TTL 0x00000002
46 #define FILE_CACHE_SIZE 64
47 #define FILE_CACHE_TTL 300
59 typedef struct asl_store_s
61 uint32_t asl_type
; //ASL OBJECT HEADER
62 int32_t refcount
; //ASL OBJECT HEADER
67 asl_cached_file_t file_cache
[FILE_CACHE_SIZE
];
70 time_t start_tomorrow
;
78 const asl_jump_table_t
*asl_store_jump_table(void);
80 uint32_t asl_store_open_write(const char *basedir
, asl_store_t
**s
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
81 uint32_t asl_store_open_read(const char *basedir
, asl_store_t
**s
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
82 uint32_t asl_store_close(asl_store_t
*s
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
83 asl_store_t
*asl_store_retain(asl_store_t
*s
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
84 void asl_store_release(asl_store_t
*s
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
85 uint32_t asl_store_statistics(asl_store_t
*s
, asl_msg_t
**msg
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
87 uint32_t asl_store_set_flags(asl_store_t
*s
, uint32_t flags
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
89 uint32_t asl_store_save(asl_store_t
*s
, asl_msg_t
*msg
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
91 asl_msg_list_t
*asl_store_match(asl_store_t
*s
, asl_msg_list_t
*query
, uint64_t *last
, uint64_t start
, uint32_t count
, uint32_t duration
, int32_t direction
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
93 uint32_t asl_store_match_start(asl_store_t
*s
, uint64_t start_id
, int32_t direction
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
94 uint32_t asl_store_match_next(asl_store_t
*s
, asl_msg_list_t
*query
, asl_msg_list_t
**res
, uint32_t count
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
96 uint32_t asl_store_max_file_size(asl_store_t
*s
, size_t max
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
97 uint32_t asl_store_sweep_file_cache(asl_store_t
*s
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(3.2,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
99 uint32_t asl_store_open_aux(asl_store_t
*s
, asl_msg_t
*msg
, int *fd
, char **url
) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
103 #endif /* __ASL_STORE_H__ */