Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mms-engine
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mer-core
mms-engine
Commits
9b4a9246
Commit
9b4a9246
authored
Sep 29, 2016
by
Slava Monich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mms-engine] Replaced MMS_CAST with G_CAST. MER#1027
parent
e3f703c0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
15 deletions
+22
-15
mms-engine/mms_engine.c
mms-engine/mms_engine.c
+2
-1
mms-lib/include/mms_lib_types.h
mms-lib/include/mms_lib_types.h
+0
-5
mms-lib/src/mms_attachment_jpeg.c
mms-lib/src/mms_attachment_jpeg.c
+3
-1
mms-lib/src/mms_dispatcher.c
mms-lib/src/mms_dispatcher.c
+3
-1
mms-lib/test/common/test_handler.c
mms-lib/test/common/test_handler.c
+4
-2
mms-lib/test/test_read_report/test_read_report.c
mms-lib/test/test_read_report/test_read_report.c
+2
-1
mms-lib/test/test_retrieve/test_retrieve.c
mms-lib/test/test_retrieve/test_retrieve.c
+2
-1
mms-lib/test/test_retrieve_no_proxy/test_retrieve_no_proxy.c
mms-lib/test/test_retrieve_no_proxy/test_retrieve_no_proxy.c
+2
-1
mms-lib/test/test_retrieve_order/test_retrieve_order.c
mms-lib/test/test_retrieve_order/test_retrieve_order.c
+2
-1
mms-lib/test/test_send/test_send.c
mms-lib/test/test_send/test_send.c
+2
-1
No files found.
mms-engine/mms_engine.c
View file @
9b4a9246
...
...
@@ -31,6 +31,7 @@
/* Generated code */
#include "org.nemomobile.MmsEngine.h"
#include <gutil_macros.h>
#include <gutil_misc.h>
#include <gutil_log.h>
...
...
@@ -76,7 +77,7 @@ G_DEFINE_TYPE(MMSEngine, mms_engine, G_TYPE_OBJECT)
inline
static
MMSEngine
*
mms_engine_from_dispatcher_delegate
(
MMSDispatcherDelegate
*
delegate
)
{
return
MMS
_CAST
(
delegate
,
MMSEngine
,
dispatcher_delegate
);
}
{
return
G
_CAST
(
delegate
,
MMSEngine
,
dispatcher_delegate
);
}
static
gboolean
...
...
mms-lib/include/mms_lib_types.h
View file @
9b4a9246
...
...
@@ -10,7 +10,6 @@
* 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
...
...
@@ -82,10 +81,6 @@ typedef enum _MMS_CONNECTION_TYPE {
MMS_CONNECTION_TYPE_USER
/* Connection requested by user */
}
MMS_CONNECTION_TYPE
;
/* Convenience macros */
#define MMS_CAST(address,type,field) \
((type *)((guint8*)(address) - G_STRUCT_OFFSET(type,field)))
#endif
/* JOLLA_MMS_LIB_TYPES_H */
/*
...
...
mms-lib/src/mms_attachment_jpeg.c
View file @
9b4a9246
...
...
@@ -15,6 +15,8 @@
#include "mms_attachment_image.h"
#include "mms_file_util.h"
#include <gutil_macros.h>
#include <jpeglib.h>
#include <jerror.h>
#include <setjmp.h>
...
...
@@ -47,7 +49,7 @@ typedef struct mms_attachment_jpeg_resize {
static
inline
MMSAttachmentJpegResize
*
mms_attachment_jpeg_resize_cast
(
MMSAttachmentImageResize
*
resize
)
{
return
MMS
_CAST
(
resize
,
MMSAttachmentJpegResize
,
pub
);
}
{
return
G
_CAST
(
resize
,
MMSAttachmentJpegResize
,
pub
);
}
static
void
...
...
mms-lib/src/mms_dispatcher.c
View file @
9b4a9246
...
...
@@ -23,6 +23,8 @@
#include "mms_util.h"
#include "mms_task.h"
#include <gutil_macros.h>
#include <errno.h>
/* Logging */
...
...
@@ -57,7 +59,7 @@ typedef struct mms_dispatcher_idle_callback {
inline
static
MMSDispatcher
*
mms_dispatcher_from_task_delegate
(
MMSTaskDelegate
*
delegate
)
{
return
MMS
_CAST
(
delegate
,
MMSDispatcher
,
task_delegate
);
}
{
return
G
_CAST
(
delegate
,
MMSDispatcher
,
task_delegate
);
}
static
void
...
...
mms-lib/test/common/test_handler.c
View file @
9b4a9246
...
...
@@ -15,6 +15,8 @@
#include "test_handler.h"
#include "mms_dispatcher.h"
#include <gutil_macros.h>
/* Logging */
#define GLOG_MODULE_NAME mms_handler_log
#include <gutil_log.h>
...
...
@@ -104,7 +106,7 @@ MMSHandlerRecordSend*
mms_handler_test_record_send
(
MMSHandlerRecord
*
rec
)
{
GASSERT
(
rec
->
type
==
MMS_HANDLER_RECORD_SEND
);
return
MMS
_CAST
(
rec
,
MMSHandlerRecordSend
,
rec
);
return
G
_CAST
(
rec
,
MMSHandlerRecordSend
,
rec
);
}
static
inline
...
...
@@ -112,7 +114,7 @@ MMSHandlerRecordReceive*
mms_handler_test_record_receive
(
MMSHandlerRecord
*
rec
)
{
GASSERT
(
rec
->
type
==
MMS_HANDLER_RECORD_RECEIVE
);
return
MMS
_CAST
(
rec
,
MMSHandlerRecordReceive
,
rec
);
return
G
_CAST
(
rec
,
MMSHandlerRecordReceive
,
rec
);
}
static
...
...
mms-lib/test/test_read_report/test_read_report.c
View file @
9b4a9246
...
...
@@ -23,6 +23,7 @@
#include "mms_settings.h"
#include "mms_dispatcher.h"
#include <gutil_macros.h>
#include <gutil_log.h>
#include <gio/gio.h>
...
...
@@ -80,7 +81,7 @@ test_done(
MMSDispatcherDelegate
*
delegate
,
MMSDispatcher
*
dispatcher
)
{
Test
*
test
=
MMS
_CAST
(
delegate
,
Test
,
delegate
);
Test
*
test
=
G
_CAST
(
delegate
,
Test
,
delegate
);
const
TestDesc
*
desc
=
test
->
desc
;
const
char
*
name
=
desc
->
name
;
if
(
test
->
ret
==
RET_OK
)
{
...
...
mms-lib/test/test_retrieve/test_retrieve.c
View file @
9b4a9246
...
...
@@ -25,6 +25,7 @@
#include "mms_settings.h"
#include "mms_dispatcher.h"
#include <gutil_macros.h>
#include <gutil_log.h>
#include <libsoup/soup-status.h>
...
...
@@ -513,7 +514,7 @@ test_done(
MMSDispatcherDelegate
*
delegate
,
MMSDispatcher
*
dispatcher
)
{
Test
*
test
=
MMS
_CAST
(
delegate
,
Test
,
delegate
);
Test
*
test
=
G
_CAST
(
delegate
,
Test
,
delegate
);
if
(
!
mms_handler_test_receive_pending
(
test
->
handler
,
NULL
))
{
test_finish
(
test
);
}
...
...
mms-lib/test/test_retrieve_no_proxy/test_retrieve_no_proxy.c
View file @
9b4a9246
...
...
@@ -24,6 +24,7 @@
#include "mms_settings.h"
#include "mms_dispatcher.h"
#include <gutil_macros.h>
#include <gutil_log.h>
#include <gio/gio.h>
#include <libsoup/soup-status.h>
...
...
@@ -95,7 +96,7 @@ test_done(
MMSDispatcherDelegate
*
delegate
,
MMSDispatcher
*
dispatcher
)
{
Test
*
test
=
MMS
_CAST
(
delegate
,
Test
,
delegate
);
Test
*
test
=
G
_CAST
(
delegate
,
Test
,
delegate
);
test_finish
(
test
);
}
...
...
mms-lib/test/test_retrieve_order/test_retrieve_order.c
View file @
9b4a9246
...
...
@@ -24,6 +24,7 @@
#include "mms_settings.h"
#include "mms_dispatcher.h"
#include <gutil_macros.h>
#include <gutil_log.h>
#include <libsoup/soup-status.h>
...
...
@@ -152,7 +153,7 @@ test_done(
MMSDispatcherDelegate
*
delegate
,
MMSDispatcher
*
dispatcher
)
{
Test
*
test
=
MMS
_CAST
(
delegate
,
Test
,
delegate
);
Test
*
test
=
G
_CAST
(
delegate
,
Test
,
delegate
);
if
(
!
mms_handler_test_receive_pending
(
test
->
handler
,
NULL
))
{
test_finish
(
test
);
}
...
...
mms-lib/test/test_send/test_send.c
View file @
9b4a9246
...
...
@@ -24,6 +24,7 @@
#include "mms_settings.h"
#include "mms_dispatcher.h"
#include <gutil_macros.h>
#include <gutil_log.h>
#include <gio/gio.h>
#include <libsoup/soup-status.h>
...
...
@@ -315,7 +316,7 @@ test_done(
MMSDispatcherDelegate
*
delegate
,
MMSDispatcher
*
dispatcher
)
{
Test
*
test
=
MMS
_CAST
(
delegate
,
Test
,
delegate
);
Test
*
test
=
G
_CAST
(
delegate
,
Test
,
delegate
);
if
(
!
mms_handler_test_receive_pending
(
test
->
handler
,
NULL
))
{
test_finish
(
test
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment