Skip to content

Latest commit

 

History

History
90 lines (76 loc) · 2.36 KB

mms_lib_types.h

File metadata and controls

90 lines (76 loc) · 2.36 KB
 
Feb 17, 2014
Feb 17, 2014
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
/*
* Copyright (C) 2013-2014 Jolla Ltd.
*
* 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_LIB_TYPES_H
#define JOLLA_MMS_LIB_TYPES_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef _WIN32
# include <io.h>
Feb 17, 2014
Feb 17, 2014
27
# include <direct.h>
Feb 17, 2014
Feb 17, 2014
28
29
30
31
#else
# include <unistd.h>
#endif
Feb 20, 2014
Feb 20, 2014
32
#include <fcntl.h>
Feb 20, 2014
Feb 20, 2014
33
Feb 17, 2014
Feb 17, 2014
34
35
36
#include <glib.h>
#include <glib-object.h>
Feb 20, 2014
Feb 20, 2014
37
38
39
40
#ifndef O_BINARY
# define O_BINARY (0)
#endif
Feb 26, 2014
Feb 26, 2014
41
42
43
44
45
#ifdef __linux__
# define HAVE_MAGIC
# define HAVE_REALPATH
#endif
Feb 25, 2014
Feb 25, 2014
46
47
48
49
50
51
52
/* Attachment information */
typedef struct mms_attachment_info {
const char* file_name; /* Full path name */
const char* content_type; /* Content type */
const char* content_id; /* Content id */
} MMSAttachmentInfo;
Feb 17, 2014
Feb 17, 2014
53
/* Types */
May 12, 2014
May 12, 2014
54
55
56
typedef struct mms_config MMSConfig;
typedef struct mms_settings MMSSettings;
typedef struct mms_settings_sim_data MMSSettingsSimData;
May 7, 2014
May 7, 2014
57
58
typedef struct mms_handler MMSHandler;
typedef struct mms_connman MMSConnMan;
Feb 17, 2014
Feb 17, 2014
59
60
61
62
63
typedef struct mms_log_module MMSLogModule;
typedef struct mms_dispatcher MMSDispatcher;
typedef struct mms_connection MMSConnection;
typedef struct mms_message MMSPdu;
typedef struct _mms_message MMSMessage;
Feb 25, 2014
Feb 25, 2014
64
typedef struct _mms_attachment MMSAttachment;
Feb 17, 2014
Feb 17, 2014
65
66
67
/* MMS content type */
#define MMS_CONTENT_TYPE "application/vnd.wap.mms-message"
Feb 25, 2014
Feb 25, 2014
68
#define SMIL_CONTENT_TYPE "application/smil"
Feb 17, 2014
Feb 17, 2014
69
70
71
/* MMS read status */
typedef enum mms_read_status {
Mar 16, 2014
Mar 16, 2014
72
73
74
MMS_READ_STATUS_INVALID = -1, /* Invalid or unknown status */
MMS_READ_STATUS_READ, /* Message has been read */
MMS_READ_STATUS_DELETED /* Message deleted without reading */
Feb 17, 2014
Feb 17, 2014
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
} MMSReadStatus;
/* Convenience macros */
#define MMS_CAST(address,type,field) ((type *)( \
(char*)(address) - \
(char*)(&((type *)0)->field)))
#endif /* JOLLA_MMS_LIB_TYPES_H */
/*
* Local Variables:
* mode: C
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*/