Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblinphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
24
Merge Requests
24
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
liblinphone
Commits
b1a37f6b
Commit
b1a37f6b
authored
Sep 13, 2017
by
Ronan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(utils): remove content-type files
parent
093ae07e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
88 deletions
+46
-88
chat.c
coreapi/chat.c
+2
-2
CMakeLists.txt
src/CMakeLists.txt
+0
-2
chat-room.cpp
src/chat/chat-room.cpp
+2
-2
content-type.cpp
src/content/content-type.cpp
+32
-0
content-type.h
src/content/content-type.h
+10
-0
content-type.cpp
src/utils/content-type.cpp
+0
-43
content-type.h
src/utils/content-type.h
+0
-39
No files found.
coreapi/chat.c
View file @
b1a37f6b
...
...
@@ -37,9 +37,9 @@
#include "c-wrapper/c-tools.h"
#include "chat/basic-chat-room.h"
#include "chat/real-time-text-chat-room.h"
#include "chat/real-time-text-chat-room-p.h"
#include "utils/content-type.h"
#include "chat/real-time-text-chat-room.h"
#include "content/content-type.h"
struct
_LinphoneChatRoom
{
belle_sip_object_t
base
;
...
...
src/CMakeLists.txt
View file @
b1a37f6b
...
...
@@ -92,7 +92,6 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
object/object-p.h
object/object.h
object/singleton.h
utils/content-type.h
utils/payload-type-handler.h
)
...
...
@@ -141,7 +140,6 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
nat/stun-client.cpp
object/clonable-object.cpp
object/object.cpp
utils/content-type.cpp
utils/general.cpp
utils/payload-type-handler.cpp
utils/utils.cpp
...
...
src/chat/chat-room.cpp
View file @
b1a37f6b
...
...
@@ -20,11 +20,11 @@
#include "linphone/utils/utils.h"
#include "c-wrapper/c-tools.h"
#include "chat-room-p.h"
#include "content/content-type.h"
#include "imdn.h"
#include "c-wrapper/c-tools.h"
#include "logger/logger.h"
#include "utils/content-type.h"
#include "chat-room.h"
...
...
src/content/content-type.cpp
View file @
b1a37f6b
...
...
@@ -108,4 +108,36 @@ string ContentType::asString () const {
return
isValid
()
?
d
->
type
+
"/"
+
d
->
subType
:
""
;
}
bool
ContentType
::
isFileTransfer
()
const
{
return
isFileTransfer
(
asString
());
}
bool
ContentType
::
isImIsComposing
()
const
{
return
isFileTransfer
(
asString
());
}
bool
ContentType
::
isImdn
()
const
{
return
isImdn
(
asString
());
}
bool
ContentType
::
isText
()
const
{
return
isText
(
asString
());
}
bool
ContentType
::
isFileTransfer
(
const
string
&
contentType
)
{
return
contentType
==
"application/vnd.gsma.rcs-ft-http+xml"
;
}
bool
ContentType
::
isImIsComposing
(
const
string
&
contentType
)
{
return
contentType
==
"application/im-iscomposing+xml"
;
}
bool
ContentType
::
isImdn
(
const
string
&
contentType
)
{
return
contentType
==
"message/imdn+xml"
;
}
bool
ContentType
::
isText
(
const
string
&
contentType
)
{
return
contentType
==
"text/plain"
;
}
LINPHONE_END_NAMESPACE
src/content/content-type.h
View file @
b1a37f6b
...
...
@@ -49,6 +49,16 @@ public:
std
::
string
asString
()
const
;
bool
isFileTransfer
()
const
;
bool
isImIsComposing
()
const
;
bool
isImdn
()
const
;
bool
isText
()
const
;
static
bool
isFileTransfer
(
const
std
::
string
&
contentType
);
static
bool
isImIsComposing
(
const
std
::
string
&
contentType
);
static
bool
isImdn
(
const
std
::
string
&
contentType
);
static
bool
isText
(
const
std
::
string
&
contentType
);
private
:
L_DECLARE_PRIVATE
(
ContentType
);
};
...
...
src/utils/content-type.cpp
deleted
100644 → 0
View file @
093ae07e
/*
* content-type.cpp
* Copyright (C) 2017 Belledonne Communications SARL
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "content-type.h"
// =============================================================================
using
namespace
std
;
LINPHONE_BEGIN_NAMESPACE
bool
ContentType
::
isFileTransfer
(
const
string
&
contentType
)
{
return
"application/vnd.gsma.rcs-ft-http+xml"
==
contentType
;
}
bool
ContentType
::
isImIsComposing
(
const
string
&
contentType
)
{
return
"application/im-iscomposing+xml"
==
contentType
;
}
bool
ContentType
::
isImdn
(
const
string
&
contentType
)
{
return
"message/imdn+xml"
==
contentType
;
}
bool
ContentType
::
isText
(
const
string
&
contentType
)
{
return
"text/plain"
==
contentType
;
}
LINPHONE_END_NAMESPACE
src/utils/content-type.h
deleted
100644 → 0
View file @
093ae07e
/*
* content-type.h
* Copyright (C) 2017 Belledonne Communications SARL
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _CONTENT_TYPE_H_
#define _CONTENT_TYPE_H_
#include <string>
#include "linphone/utils/general.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
namespace
ContentType
{
bool
isFileTransfer
(
const
std
::
string
&
contentType
);
bool
isImIsComposing
(
const
std
::
string
&
contentType
);
bool
isImdn
(
const
std
::
string
&
contentType
);
bool
isText
(
const
std
::
string
&
contentType
);
}
LINPHONE_END_NAMESPACE
#endif // ifndef _CONTENT_TYPE_H_
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