Skip to content

Latest commit

 

History

History
101 lines (85 loc) · 2.22 KB

mms_connman.h

File metadata and controls

101 lines (85 loc) · 2.22 KB
 
Feb 17, 2014
Feb 17, 2014
1
/*
Feb 2, 2016
Feb 2, 2016
2
* Copyright (C) 2013-2016 Jolla Ltd.
Feb 17, 2014
Feb 17, 2014
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
*
* 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_CONNMAN_H
#define JOLLA_MMS_CONNMAN_H
#include "mms_lib_types.h"
May 7, 2014
May 7, 2014
20
21
22
/* Instance */
struct mms_connman {
GObject object;
Feb 2, 2016
Feb 2, 2016
23
int busy;
May 7, 2014
May 7, 2014
24
25
26
};
/* Class */
Feb 17, 2014
Feb 17, 2014
27
28
typedef struct mms_connman_class {
GObjectClass parent;
Feb 19, 2014
Feb 19, 2014
29
char* (*fn_default_imsi)(MMSConnMan* cm);
Feb 17, 2014
Feb 17, 2014
30
31
32
33
34
35
36
MMSConnection* (*fn_open_connection)(MMSConnMan* cm, const char* imsi,
gboolean user_request);
} MMSConnManClass;
GType mms_connman_get_type(void);
#define MMS_TYPE_CONNMAN (mms_connman_get_type())
Feb 2, 2016
Feb 2, 2016
37
38
39
40
41
42
/* Connman event callback */
typedef void
(*mms_connman_event_fn)(
MMSConnMan* cm,
void* param);
Feb 17, 2014
Feb 17, 2014
43
44
45
46
47
48
49
50
51
/* Reference counting */
MMSConnMan*
mms_connman_ref(
MMSConnMan* cm);
void
mms_connman_unref(
MMSConnMan* cm);
Feb 19, 2014
Feb 19, 2014
52
53
54
55
56
57
58
59
/**
* Returns default (first available) IMSI or NULL if SIM is not present
* or not configured. Caller must g_free() the returned string.
*/
char*
mms_connman_default_imsi(
MMSConnMan* cm);
Feb 17, 2014
Feb 17, 2014
60
61
62
63
64
65
66
67
68
69
/**
* Creates a new connection or returns the reference to an aready active one.
* The caller must release the reference.
*/
MMSConnection*
mms_connman_open_connection(
MMSConnMan* cm,
const char* imsi,
gboolean user_request);
Feb 2, 2016
Feb 2, 2016
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* While busy flags is on, mms-engine shouldn't exit
*/
void
mms_connman_busy_update(
MMSConnMan* cm,
int change);
gulong
mms_connman_add_done_callback(
MMSConnMan* cm,
mms_connman_event_fn fn,
void* param);
void
mms_connman_remove_callback(
MMSConnMan* cm,
gulong handler_id);
#define mms_connman_busy(cm) ((cm) && ((cm)->busy > 0))
#define mms_connman_busy_inc(cm) mms_connman_busy_update(cm,1)
#define mms_connman_busy_dec(cm) mms_connman_busy_update(cm,-1)
Feb 17, 2014
Feb 17, 2014
93
94
95
96
97
98
99
100
101
#endif /* JOLLA_MMS_CONNMAN_H */
/*
* Local Variables:
* mode: C
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*/