LCOV - code coverage report
Current view: top level - core - scope.h (source / functions) Hit Total Coverage
Test: main_coverage.info Lines: 1 1 100.0 %
Date: 2019-08-22 15:41:25 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* SPDX-License-Identifier: LGPL-2.1+ */
       2             : #pragma once
       3             : 
       4             : typedef struct Scope Scope;
       5             : 
       6             : #include "cgroup.h"
       7             : #include "kill.h"
       8             : #include "unit.h"
       9             : 
      10             : typedef enum ScopeResult {
      11             :         SCOPE_SUCCESS,
      12             :         SCOPE_FAILURE_RESOURCES,
      13             :         SCOPE_FAILURE_TIMEOUT,
      14             :         _SCOPE_RESULT_MAX,
      15             :         _SCOPE_RESULT_INVALID = -1
      16             : } ScopeResult;
      17             : 
      18             : struct Scope {
      19             :         Unit meta;
      20             : 
      21             :         CGroupContext cgroup_context;
      22             :         KillContext kill_context;
      23             : 
      24             :         ScopeState state, deserialized_state;
      25             :         ScopeResult result;
      26             : 
      27             :         usec_t timeout_stop_usec;
      28             : 
      29             :         char *controller;
      30             :         sd_bus_track *controller_track;
      31             : 
      32             :         bool was_abandoned;
      33             : 
      34             :         sd_event_source *timer_event_source;
      35             : };
      36             : 
      37             : extern const UnitVTable scope_vtable;
      38             : 
      39             : int scope_abandon(Scope *s);
      40             : 
      41             : const char* scope_result_to_string(ScopeResult i) _const_;
      42             : ScopeResult scope_result_from_string(const char *s) _pure_;
      43             : 
      44         148 : DEFINE_CAST(SCOPE, Scope);

Generated by: LCOV version 1.14