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
763156e9
Commit
763156e9
authored
5 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
session-item: add an _activate_finish() method
parent
dec86997
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/session-item.c
+19
-2
19 additions, 2 deletions
lib/wp/session-item.c
lib/wp/session-item.h
+4
-0
4 additions, 0 deletions
lib/wp/session-item.h
with
23 additions
and
2 deletions
lib/wp/session-item.c
+
19
−
2
View file @
763156e9
...
@@ -295,8 +295,8 @@ on_transition_completed (WpTransition * transition, GParamSpec * pspec,
...
@@ -295,8 +295,8 @@ on_transition_completed (WpTransition * transition, GParamSpec * pspec,
* that calls into #WpSessionItemClass.get_next_step() and
* that calls into #WpSessionItemClass.get_next_step() and
* #WpSessionItemClass.execute_step() to advance.
* #WpSessionItemClass.execute_step() to advance.
*
*
* You can use wp_
transition
_finish() in the @callback to figure out
the
* You can use wp_
session_item_activate
_finish() in the @callback to figure out
* result of this operation.
*
the
result of this operation.
*
*
* Normally this function is called internally by the session; there is no need
* Normally this function is called internally by the session; there is no need
* to activate an item externally, except for unit testing purposes.
* to activate an item externally, except for unit testing purposes.
...
@@ -326,6 +326,23 @@ wp_session_item_activate (WpSessionItem * self,
...
@@ -326,6 +326,23 @@ wp_session_item_activate (WpSessionItem * self,
wp_transition_advance
(
transition
);
wp_transition_advance
(
transition
);
}
}
/**
* wp_session_item_activate_finish:
* @self: the session item
* @res: the async operation result
* @error: (out) (optional): the error of the operation, if any
*
* Returns: %TRUE if the item is now activateed, %FALSE if there was an error
*/
gboolean
wp_session_item_activate_finish
(
WpSessionItem
*
self
,
GAsyncResult
*
res
,
GError
**
error
)
{
g_return_val_if_fail
(
g_async_result_is_tagged
(
res
,
wp_session_item_activate
),
FALSE
);
return
wp_transition_finish
(
res
,
error
);
}
/**
/**
* wp_session_item_reset: (virtual reset)
* wp_session_item_reset: (virtual reset)
* @self: the session item
* @self: the session item
...
...
This diff is collapsed.
Click to expand it.
lib/wp/session-item.h
+
4
−
0
View file @
763156e9
...
@@ -114,6 +114,10 @@ WP_API
...
@@ -114,6 +114,10 @@ WP_API
void
wp_session_item_activate
(
WpSessionItem
*
self
,
void
wp_session_item_activate
(
WpSessionItem
*
self
,
GAsyncReadyCallback
callback
,
gpointer
callback_data
);
GAsyncReadyCallback
callback
,
gpointer
callback_data
);
WP_API
gboolean
wp_session_item_activate_finish
(
WpSessionItem
*
self
,
GAsyncResult
*
res
,
GError
**
error
);
WP_API
WP_API
void
wp_session_item_reset
(
WpSessionItem
*
self
);
void
wp_session_item_reset
(
WpSessionItem
*
self
);
...
...
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