File: plugin.h

package info (click to toggle)
bitcollider 0.3.1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,116 kB
  • ctags: 573
  • sloc: sh: 5,490; ansic: 4,805; cpp: 245; makefile: 109
file content (57 lines) | stat: -rw-r--r-- 1,436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* (PD) 2001 The Bitzi Corporation
 * Please see file COPYING or http://bitzi.com/publicdomain 
 * for more info.
 *
 * $Id: plugin.h,v 1.5 2001/03/19 23:38:29 mayhemchaos Exp $
 */
#ifndef PLUGIN_H
#define PLUGIN_H

#ifdef __cplusplus
extern "C" {
#endif

/*-------------------------------------------------------------------------*/

typedef struct _SupportedFormat
{
    char *fileExtension;
    char *formatName;
} SupportedFormat;

typedef struct _Attribute
{
    char *key;
    char *value;
} Attribute;

typedef void *Context;

typedef struct _PluginMethods
{
    void              (*shutdown_plugin)      (void);

    const char       *(*get_version)          (void);
    const char       *(*get_name)             (void);
    SupportedFormat  *(*get_supported_formats)(void);
   
    Attribute        *(*file_analyze)         (const char *fileName);

    Context           (*mem_analyze_init)     (void);
    void              (*mem_analyze_update)   (Context context, 
                                               const unsigned char *,
                                               unsigned bufLen);
    Attribute        *(*mem_analyze_final)    (Context context);

    void              (*free_attributes)      (Attribute *attrList);

    const char       *(*get_error)            (void);
} PluginMethods;

/*-------------------------------------------------------------------------*/

#ifdef __cplusplus
}
#endif

#endif