Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
6582de2f
Commit
6582de2f
authored
Jun 08, 2010
by
Austin Burrow
Committed by
Jean-Baptiste Kempf
Jun 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPNP: Cleaned up code to match code conventions
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
2d8eb31e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
modules/services_discovery/upnp_intel.cpp
modules/services_discovery/upnp_intel.cpp
+30
-30
No files found.
modules/services_discovery/upnp_intel.cpp
View file @
6582de2f
...
...
@@ -27,7 +27,6 @@
/*
\TODO: Debug messages: "__FILE__, __LINE__" ok ???, Wrn/Err ???
\TODO: Change names to VLC standard ???
*/
#undef PACKAGE_NAME
#ifdef HAVE_CONFIG_H
...
...
@@ -148,12 +147,12 @@ static void Close( vlc_object_t *p_this )
// Returns the value of a child element, or 0 on error
const
char
*
xml_getChildElementValue
(
IXML_Element
*
p_parent
,
const
char
*
_psz_tag_name
)
const
char
*
psz_tag_name_
)
{
if
(
!
p_parent
)
return
0
;
if
(
!
_psz_tag_name
)
return
0
;
if
(
!
psz_tag_name_
)
return
0
;
char
*
psz_tag_name
=
strdup
(
_psz_tag_name
);
char
*
psz_tag_name
=
strdup
(
psz_tag_name_
);
IXML_NodeList
*
p_node_list
=
ixmlElement_getElementsByTagName
(
p_parent
,
psz_tag_name
);
free
(
psz_tag_name
);
if
(
!
p_node_list
)
return
0
;
...
...
@@ -535,12 +534,12 @@ void MediaServer::subscribeToContentDirectory()
}
}
IXML_Document
*
MediaServer
::
_browseAction
(
const
char
*
p
ObjectID
,
const
char
*
p
BrowseFlag
,
const
char
*
p
Filter
,
const
char
*
p
StartingIndex
,
const
char
*
p
RequestedCount
,
const
char
*
p
SortCriteria
)
IXML_Document
*
MediaServer
::
_browseAction
(
const
char
*
p
sz_object_id_
,
const
char
*
p
sz_browser_flag_
,
const
char
*
p
sz_filter_
,
const
char
*
p
sz_starting_index_
,
const
char
*
p
sz_requested_count_
,
const
char
*
p
sz_sort_criteria_
)
{
IXML_Document
*
p_action
=
0
;
IXML_Document
*
p_response
=
0
;
...
...
@@ -552,12 +551,12 @@ IXML_Document* MediaServer::_browseAction( const char* pObjectID,
return
0
;
}
char
*
psz_object_id
=
strdup
(
p
ObjectID
);
char
*
psz_browse_flag
=
strdup
(
p
BrowseFlag
);
char
*
psz_filter
=
strdup
(
p
Filter
);
char
*
psz_starting_index
=
strdup
(
p
StartingIndex
);
char
*
psz_requested_count
=
strdup
(
p
RequestedCount
);
char
*
psz_sort_criteria
=
strdup
(
p
SortCriteria
);
char
*
psz_object_id
=
strdup
(
p
sz_object_id_
);
char
*
psz_browse_flag
=
strdup
(
p
sz_browser_flag_
);
char
*
psz_filter
=
strdup
(
p
sz_filter_
);
char
*
psz_starting_index
=
strdup
(
p
sz_starting_index_
);
char
*
psz_requested_count
=
strdup
(
p
sz_requested_count_
);
char
*
psz_sort_criteria
=
strdup
(
p
sz_sort_criteria_
);
char
*
psz_service_type
=
strdup
(
CONTENT_DIRECTORY_SERVICE_TYPE
);
int
i_res
;
...
...
@@ -930,13 +929,14 @@ void MediaServerList::removeServer( const char* psz_udn )
// Item...
Item
::
Item
(
Container
*
p_parent
,
const
char
*
objectID
,
const
char
*
title
,
const
char
*
resource
)
Item
::
Item
(
Container
*
p_parent
,
const
char
*
psz_object_id
,
const
char
*
psz_title
,
const
char
*
psz_resource
)
{
_parent
=
p_parent
;
_objectID
=
objectID
;
_title
=
title
;
_resource
=
resource
;
_objectID
=
psz_object_id
;
_title
=
psz_
title
;
_resource
=
psz_
resource
;
_inputItem
=
NULL
;
}
...
...
@@ -983,13 +983,13 @@ input_item_t* Item::getInputItem() const
// Container...
Container
::
Container
(
Container
*
p_parent
,
const
char
*
objectID
,
const
char
*
title
)
const
char
*
psz_object_id
,
const
char
*
psz_
title
)
{
_parent
=
p_parent
;
_objectID
=
objectID
;
_title
=
title
;
_objectID
=
psz_object_id
;
_title
=
psz_
title
;
_inputItem
=
NULL
;
}
...
...
@@ -1015,9 +1015,9 @@ void Container::addItem( Item* item )
_items
.
push_back
(
item
);
}
void
Container
::
addContainer
(
Container
*
container
)
void
Container
::
addContainer
(
Container
*
p_
container
)
{
_containers
.
push_back
(
container
);
_containers
.
push_back
(
p_
container
);
}
const
char
*
Container
::
getObjectID
()
const
...
...
@@ -1040,15 +1040,15 @@ unsigned int Container::getNumContainers() const
return
_containers
.
size
();
}
Item
*
Container
::
getItem
(
unsigned
int
i
)
const
Item
*
Container
::
getItem
(
unsigned
int
i
_index
)
const
{
if
(
i
<
_items
.
size
()
)
return
_items
[
i
];
if
(
i
_index
<
_items
.
size
()
)
return
_items
[
i_index
];
return
0
;
}
Container
*
Container
::
getContainer
(
unsigned
int
i
)
const
Container
*
Container
::
getContainer
(
unsigned
int
i
_index
)
const
{
if
(
i
<
_containers
.
size
()
)
return
_containers
[
i
];
if
(
i
_index
<
_containers
.
size
()
)
return
_containers
[
i_index
];
return
0
;
}
...
...
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