atomizer_driver.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 /
00003 /   File:           atomizer_driver.h
00004 /
00005 /   Description:    User-space atomizer driver API
00006 /
00007 /   Copyright 1999, Be Incorporated, All Rights Reserved.
00008 /
00009 *******************************************************************************/
00010 
00011 #ifndef _ATOMIZER_DRIVER_H_
00012 #define _ATOMIZER_DRIVER_H_
00013 
00014 #include <Drivers.h>
00015 #include "atomizer.h"
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 enum {
00022     B_ATOMIZER_FIND_OR_MAKE_ATOMIZER = B_DEVICE_OP_CODES_END + 1,
00023     B_ATOMIZER_DELETE_ATOMIZER,
00024     B_ATOMIZER_ATOMIZE,
00025     B_ATOMIZER_STRING_FOR_TOKEN,
00026     B_ATOMIZER_GET_NEXT_ATOMIZER_INFO,
00027     B_ATOMIZER_GET_NEXT_ATOM    
00028 };
00029 
00030 #define ATOMIZER_PRIVATE_DATA_MAGIC 'ATOM' /* a private driver rev, of sorts */
00031 
00032 typedef struct {
00033     uint32      magic;  /* magic number to make sure the caller groks us */
00034     const char  *name;  /* name of atomizer to search for/create */
00035     const void  *atomizer;  /* a token representing the atomizer */
00036 } atomizer_find_or_make_atomizer;
00037 
00038 typedef struct {
00039     uint32      magic;  /* magic number to make sure the caller groks us */
00040     const void  *atomizer;  /* a token representing the atomizer to delete */
00041 } atomizer_delete_atomizer;
00042 
00043 typedef struct {
00044     uint32      magic;  /* magic number to make sure the caller groks us */
00045     const void  *atomizer;  /* a token representing the atomizer */
00046     const char  *string;    /* string to atomize */
00047     int         create;     /* non-zero if token should be created if not already there */
00048     const void  *atom;      /* token representing atomized string */
00049 } atomizer_atomize;
00050 
00051 typedef struct {
00052     uint32      magic;  /* magic number to make sure the caller groks us */
00053     const void  *atomizer;  /* a token representing the atomizer */
00054     const void  *atom;      /* token representing atomized string */
00055     char        *string;    /* buffer to copy the string to */
00056     uint32      max_size;   /* maximum number of bytes to copy into buffer */
00057     uint32      length;     /* actuall length of the string */
00058 } atomizer_string_for_token;
00059 
00060 typedef struct {
00061     uint32      magic;  /* magic number to make sure the caller groks us */
00062     void        **cookie;   /* a token for keeping track of the list of atomizers */
00063     atomizer_info   *info;  /* pointer to info about the atomizer */
00064 } atomizer_get_next_atomizer_info;
00065 
00066 typedef struct {
00067     uint32      magic;  /* magic number to make sure the caller groks us */
00068     const void  *atomizer;  /* a token representing the atomizer */
00069     uint32      *cookie;    /* a token for keeping track of the list of atoms */
00070     const void  *atom;      /* the results */
00071 } atomizer_get_next_token;
00072 
00073 #ifdef __cplusplus
00074 }
00075 #endif
00076 
00077 #endif

Copyright 2005 by yellowTAB GmbH, Be Inc., Palm Source Inc. and their respective legal successors
All rights reserved.