2011-10-29 19:38:20 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2010, Haiku Inc. All Rights Reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _ATOMIZER_H
|
|
|
|
#define _ATOMIZER_H
|
|
|
|
|
|
|
|
#include <SupportDefs.h>
|
2003-09-25 17:30:05 +04:00
|
|
|
#include <module.h>
|
|
|
|
|
2011-10-29 19:38:20 +04:00
|
|
|
|
2003-09-25 17:30:05 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-10-29 19:38:20 +04:00
|
|
|
#define B_ATOMIZER_MODULE_NAME "generic/atomizer/v1"
|
|
|
|
#define B_SYSTEM_ATOMIZER_NAME "Haiku System Atomizer"
|
2003-09-25 17:30:05 +04:00
|
|
|
|
|
|
|
|
2011-10-29 19:38:20 +04:00
|
|
|
typedef struct atomizer_info {
|
|
|
|
void* atomizer;
|
|
|
|
char name[B_OS_NAME_LENGTH];
|
|
|
|
uint32 atom_count;
|
2003-09-25 17:30:05 +04:00
|
|
|
} atomizer_info;
|
|
|
|
|
2011-10-29 19:38:20 +04:00
|
|
|
|
|
|
|
typedef struct atomizer_module_info {
|
2003-09-25 17:30:05 +04:00
|
|
|
module_info minfo;
|
2011-10-29 19:38:20 +04:00
|
|
|
const void* (*find_or_make_atomizer)(const char* string);
|
|
|
|
status_t (*delete_atomizer)(const void* atomizer);
|
|
|
|
const void* (*atomize)
|
|
|
|
(const void* atomizer, const char* string, int create);
|
|
|
|
const char* (*string_for_token)
|
|
|
|
(const void* atomizer, const void* atom);
|
|
|
|
status_t (*get_next_atomizer_info)
|
|
|
|
(void** cookie, atomizer_info* info);
|
|
|
|
const void* (*get_next_atom)(const void* atomizer, uint32* cookie);
|
2003-09-25 17:30:05 +04:00
|
|
|
} atomizer_module_info;
|
|
|
|
|
2011-10-29 19:38:20 +04:00
|
|
|
|
2003-09-25 17:30:05 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-10-29 19:38:20 +04:00
|
|
|
#endif /* _ATOMIZER_H */
|