Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
f5ad67c4
Commit
f5ad67c4
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
removed unused Fmtp.h
parent
ae2b66d8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-common/src/sip/Fmtp.h
+0
-155
0 additions, 155 deletions
sflphone-common/src/sip/Fmtp.h
with
0 additions
and
155 deletions
sflphone-common/src/sip/Fmtp.h
deleted
100644 → 0
+
0
−
155
View file @
ae2b66d8
/*
* Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Savoir-Faire Linux Inc.
* Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>
*
* 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, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Additional permission under GNU GPL version 3 section 7:
*
* If you modify this program, or any covered work, by linking or
* combining it with the OpenSSL project's OpenSSL library (or a
* modified version of that library), containing parts covered by the
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
* grants you additional permission to convey the resulting work.
* Corresponding Source for a non-source form of such a combination
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#ifndef __SFL_FMTP_H__
#define __SFL_FMTP_H__
#include
"logger.h"
#include
<cc++/tokenizer.h>
#include
<string>
#include
<map>
namespace
sfl
{
/**
* A utility class for holding SDP parameters.
*/
class
SdpParameter
:
public
std
::
pair
<
std
::
string
,
std
::
string
>
{
public:
SdpParameter
(
const
std
::
string
&
name
,
const
std
::
string
&
value
)
:
std
::
pair
<
std
::
string
,
std
::
string
>
(
name
,
value
)
{
}
;
~
SdpParameter
()
{
}
;
std
::
string
getName
()
const
{
return
first
;
}
std
::
string
getValue
()
const
{
return
second
;
}
};
/**
* Class for holding the attributes of a a=fmtp SDP line.
*/
class
Fmtp
:
public
std
::
map
<
std
::
string
,
std
::
string
>
{
public:
Fmtp
(
const
std
::
string
&
payloadType
)
{
this
->
payloadType
=
payloadType
;
params
=
""
;
}
Fmtp
()
{
payloadType
=
"96"
;
params
=
""
;
}
/**
* Split the params of a a=fmtp line into its individual parameter, separated by ";" tokens.
* Note that RFC4566 indicates no assumption about how this piece of data should be formatted.
*
* @param payloadType The static or dynamic payload type corresponding to some a=rtpmap line.
* @params params Codec specific parameters.
*/
Fmtp
(
const
std
::
string
&
payloadType
,
const
std
::
string
&
paramsUnparsed
)
{
this
->
payloadType
=
payloadType
;
params
=
paramsUnparsed
;
ost
::
StringTokenizer
paramsTokenizer
(
paramsUnparsed
.
c_str
(),
";"
,
false
,
true
);
ost
::
StringTokenizer
::
iterator
it
;
for
(
it
=
paramsTokenizer
.
begin
();
it
!=
paramsTokenizer
.
end
();
++
it
)
{
std
::
string
param
(
*
it
);
size_t
pos
=
param
.
find
(
"="
);
std
::
string
value
=
param
.
substr
(
pos
+
1
);
// FIXME Too naive !
std
::
string
property
=
param
.
substr
(
0
,
pos
);
// FIXME Too naive !
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
property
,
value
));
}
}
/**
* Given the list of parameters kept in this object,
* create a formatted string that represents this list.
* @return The formatted list of parameters.
*/
std
::
string
getParametersFormatted
()
const
{
std
::
string
output
=
""
;
int
numberParamsAppended
=
0
;
const_iterator
it
;
for
(
it
=
begin
();
it
!=
end
();
it
++
)
{
std
::
string
name
=
(
*
it
).
first
;
std
::
string
value
=
(
*
it
).
second
;
if
(
numberParamsAppended
!=
0
)
{
output
.
append
(
"; "
);
}
output
.
append
(
name
+
"="
+
value
);
numberParamsAppended
+=
1
;
}
return
output
;
}
/**
* @return An iterator to the element, if the specified key value is found,
* or Fmtp::end if the specified is not found in the parameter list.
*/
iterator
getParameter
(
const
std
::
string
&
paramName
)
{
return
find
(
paramName
);
}
/**
* @return An iterator to the element, if the specified key value is found,
* or Fmtp::end if the specified is not found in the parameter list.
*/
const_iterator
getParameter
(
const
std
::
string
&
paramName
)
const
{
return
find
(
paramName
);
}
/**
* @return The static or dynamic payload type corresponding to some a=rtpmap line.
*/
std
::
string
getPayloadType
()
const
{
return
payloadType
;
}
private
:
std
::
string
payloadType
;
std
::
string
params
;
};
}
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment