File: testlib-wait-for-shell-state.h

package info (click to toggle)
phosh 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 9,620 kB
  • sloc: ansic: 81,727; xml: 3,903; python: 502; sh: 456; makefile: 34; lisp: 22; javascript: 6
file content (29 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (C) 2024 The Phosh Developers
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include "testlib.h"
#include "shell-priv.h"

G_BEGIN_DECLS

typedef struct _PhoshTestWaitForShellState {
  GAsyncQueue         *queue;
  PhoshShell          *shell;
  PhoshShellStateFlags state;
  gboolean             state_enabled;
  gulong               signal_id;
} PhoshTestWaitForShellState;

PhoshTestWaitForShellState *phosh_test_wait_for_shell_state_new     (PhoshShell *shell);
void                        phosh_test_wait_for_shell_state_dispose (PhoshTestWaitForShellState *self);
void                        phosh_test_wait_for_shell_state_wait    (PhoshTestWaitForShellState *self,
                                                                     PhoshShellStateFlags state,
                                                                     gboolean enabled,
                                                                     guint64 timeout);

G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhoshTestWaitForShellState, phosh_test_wait_for_shell_state_dispose)

G_END_DECLS