/
mms_engine.h
75 lines (60 loc) · 1.77 KB
1
/*
2
3
* Copyright (C) 2013-2016 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef JOLLA_MMS_ENGINE_H
#define JOLLA_MMS_ENGINE_H
#include <gio/gio.h>
19
#include "mms_settings.h"
20
#include "mms_version.h"
21
22
23
24
25
26
#define MMS_APP_LOG_PREFIX "mms-engine"
#define MMS_ENGINE_SERVICE "org.nemomobile.MmsEngine"
#define MMS_ENGINE_PATH "/"
27
28
29
30
#define MMS_ENGINE_FLAG_KEEP_RUNNING (0x01)
#define MMS_ENGINE_FLAG_OVERRIDE_USER_AGENT (0x02)
#define MMS_ENGINE_FLAG_OVERRIDE_SIZE_LIMIT (0x04)
#define MMS_ENGINE_FLAG_OVERRIDE_MAX_PIXELS (0x08)
31
#define MMS_ENGINE_FLAG_OVERRIDE_UAPROF (0x10)
32
33
34
35
36
37
#ifndef MMS_ENGINE_CONFIG_FILE
/* Default config file */
# define MMS_ENGINE_CONFIG_FILE "/etc/mms-engine.conf"
#endif /* MMS_ENGINE_CONFIG_FILE */
38
39
40
41
42
typedef struct mms_engine MMSEngine;
MMSEngine*
mms_engine_new(
const MMSConfig* config,
43
const MMSSettingsSimData* defaults,
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
unsigned int flags,
MMSLogModule* log_modules[],
int log_count);
MMSEngine*
mms_engine_ref(
MMSEngine* engine);
void
mms_engine_unref(
MMSEngine* engine);
void
mms_engine_run(
MMSEngine* engine,
GMainLoop* loop);
void
mms_engine_stop(
MMSEngine* engine);
gboolean
mms_engine_register(
MMSEngine* engine,
GDBusConnection* bus,
GError** error);
void
mms_engine_unregister(
MMSEngine* engine);
#endif /* JOLLA_MMS_ENGINE_H */