-
Notifications
You must be signed in to change notification settings - Fork 2
/
logging_logger.h
50 lines (37 loc) · 1.39 KB
/
logging_logger.h
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
#ifndef __LOGGER_H__
#define __LOGGER_H__
#include <glib-object.h>
typedef struct _LoggingLogger LoggingLogger;
typedef struct _LoggingLoggerClass LoggingLoggerClass;
typedef struct _LoggingLoggerPrivate LoggingLoggerPrivate;
/**
* LoggingLogger:
*
* Represents a logger.
*/
struct _LoggingLogger
{
// This is reserved space for the parent class
GObject parent_instance;
gchar *name;
// Private data
LoggingLoggerPrivate *priv;
};
struct _LoggingLoggerClass
{
// This is reserved space for the parent class
GObjectClass parent_class;
// Virtual methods
void (*log) (LoggingLogger *self, gchar *msg);
};
void logging_logger_log(LoggingLogger *self, gchar *msg);
void logging_logger_log_default(LoggingLogger *self, gchar *msg);
void logging_logger_increment(LoggingLogger *self);
GType logging_logger_get_type(void);
#define LOGGING_TYPE_LOGGER (logging_logger_get_type())
#define LOGGING_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LOGGING_TYPE_LOGGER, LoggingLogger))
#define LOGGING_IS_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LOGGING_TYPE_LOGGER))
#define LOGGING_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), LOGGING_TYPE_LOGGER, LoggingLoggerClass))
#define LOGGING_IS_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), LOGGING_TYPE_LOGGER))
#define LOGGING_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LOGGING_TYPE_LOGGER, LoggingLoggerClass))
#endif