Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wireplumber
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
wireplumber
Commits
d7ef39d2
Commit
d7ef39d2
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
properties: rename _copy_all() to _update() to match the pw_properties API
... and use pw_properties_update() underneath
parent
306f75d3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/wp/properties.c
+20
-23
20 additions, 23 deletions
lib/wp/properties.c
lib/wp/properties.h
+3
-3
3 additions, 3 deletions
lib/wp/properties.h
with
23 additions
and
26 deletions
lib/wp/properties.c
+
20
−
23
View file @
d7ef39d2
...
@@ -320,6 +320,26 @@ wp_properties_unref (WpProperties * self)
...
@@ -320,6 +320,26 @@ wp_properties_unref (WpProperties * self)
g_rc_box_release_full
(
self
,
(
GDestroyNotify
)
wp_properties_free
);
g_rc_box_release_full
(
self
,
(
GDestroyNotify
)
wp_properties_free
);
}
}
/**
* wp_properties_update:
* @self: a properties object
* @props: a properties set that contains properties to update
*
* Updates (adds new or modifies existing) properties in @self, using the
* given @props as a source. Any properties that are not contained in @props
* are left untouched.
*
* Returns: the number of properties that were changed
*/
gint
wp_properties_update
(
WpProperties
*
self
,
WpProperties
*
props
)
{
g_return_val_if_fail
(
self
!=
NULL
,
-
EINVAL
);
g_return_val_if_fail
(
!
(
self
->
flags
&
FLAG_IS_DICT
),
-
EINVAL
);
return
pw_properties_update
(
self
->
props
,
wp_properties_peek_dict
(
props
));
}
/**
/**
* wp_properties_update_from_dict:
* wp_properties_update_from_dict:
* @self: a properties object
* @self: a properties object
...
@@ -389,29 +409,6 @@ wp_properties_copy_keys_valist (WpProperties * src, WpProperties * dst,
...
@@ -389,29 +409,6 @@ wp_properties_copy_keys_valist (WpProperties * src, WpProperties * dst,
return
changed
;
return
changed
;
}
}
/**
* wp_properties_copy_all:
* @src: the source properties set
* @dst: the destination properties set
*
* Copies all the properties contained in @src into @dst
*/
void
wp_properties_copy_all
(
WpProperties
*
src
,
WpProperties
*
dst
)
{
const
struct
spa_dict
*
dict
;
const
struct
spa_dict_item
*
item
;
g_return_if_fail
(
src
!=
NULL
);
g_return_if_fail
(
dst
!=
NULL
);
dict
=
wp_properties_peek_dict
(
src
);
spa_dict_for_each
(
item
,
dict
)
{
wp_properties_set
(
dst
,
item
->
key
,
item
->
value
);
}
}
/**
/**
* wp_properties_get:
* wp_properties_get:
* @self: a properties object
* @self: a properties object
...
...
This diff is collapsed.
Click to expand it.
lib/wp/properties.h
+
3
−
3
View file @
d7ef39d2
...
@@ -64,6 +64,9 @@ WpProperties * wp_properties_ref (WpProperties * self);
...
@@ -64,6 +64,9 @@ WpProperties * wp_properties_ref (WpProperties * self);
WP_API
WP_API
void
wp_properties_unref
(
WpProperties
*
self
);
void
wp_properties_unref
(
WpProperties
*
self
);
WP_API
gint
wp_properties_update
(
WpProperties
*
self
,
WpProperties
*
props
);
WP_API
WP_API
gint
wp_properties_update_from_dict
(
WpProperties
*
self
,
gint
wp_properties_update_from_dict
(
WpProperties
*
self
,
const
struct
spa_dict
*
dict
);
const
struct
spa_dict
*
dict
);
...
@@ -76,9 +79,6 @@ WP_API
...
@@ -76,9 +79,6 @@ WP_API
gint
wp_properties_copy_keys_valist
(
WpProperties
*
src
,
WpProperties
*
dst
,
gint
wp_properties_copy_keys_valist
(
WpProperties
*
src
,
WpProperties
*
dst
,
const
gchar
*
key1
,
va_list
args
);
const
gchar
*
key1
,
va_list
args
);
WP_API
void
wp_properties_copy_all
(
WpProperties
*
src
,
WpProperties
*
dst
);
WP_API
WP_API
const
gchar
*
wp_properties_get
(
WpProperties
*
self
,
const
gchar
*
key
);
const
gchar
*
wp_properties_get
(
WpProperties
*
self
,
const
gchar
*
key
);
...
...
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