File: rpmhook.h

package info (click to toggle)
rpm 4.14.2.1+dfsg1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 17,592 kB
  • sloc: ansic: 68,414; sh: 31,370; makefile: 884; cpp: 569; python: 485; perl: 222; sed: 16
file content (37 lines) | stat: -rw-r--r-- 829 bytes parent folder | download | duplicates (6)
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
#ifndef RPMHOOK_H
#define RPMHOOK_H

typedef union {
    const char * s;
    int i;
    float f;
    void * p;
} rpmhookArgv;

typedef struct rpmhookArgs_s {
    int argc;
    const char * argt;
    rpmhookArgv argv[1];
} * rpmhookArgs;

typedef int (*rpmhookFunc) (rpmhookArgs args, void *data);

#ifdef __cplusplus
extern "C" {
#endif
 
rpmhookArgs rpmhookArgsNew(int argc);
rpmhookArgs rpmhookArgsFree(rpmhookArgs args);

void rpmhookRegister(const char *name, rpmhookFunc func, void *data);
void rpmhookUnregister(const char *name, rpmhookFunc func, void *data);
void rpmhookUnregisterAny(const char *name, rpmhookFunc func);
void rpmhookUnregisterAll(const char *name);
void rpmhookCall(const char *name, const char *argt, ...);
void rpmhookCallArgs(const char *name, rpmhookArgs args);

#ifdef __cplusplus
}
#endif

#endif