userenv

  1# This file was automatically generated by SWIG (https://www.swig.org).
  2# Version 4.2.1
  3#
  4# Do not make changes to this file unless you know what you are doing - modify
  5# the SWIG interface file instead.
  6
  7from sys import version_info as _swig_python_version_info
  8from mock_rtems import _userenv as _userenv
  9
 10try:
 11    import builtins as __builtin__
 12except ImportError:
 13    import __builtin__
 14
 15def _swig_repr(self):
 16    try:
 17        strthis = "proxy of " + self.this.__repr__()
 18    except __builtin__.Exception:
 19        strthis = ""
 20    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
 21
 22
 23def _swig_setattr_nondynamic_instance_variable(set):
 24    def set_instance_attr(self, name, value):
 25        if name == "this":
 26            set(self, name, value)
 27        elif name == "thisown":
 28            self.this.own(value)
 29        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
 30            set(self, name, value)
 31        else:
 32            raise AttributeError("You cannot add instance attributes to %s" % self)
 33    return set_instance_attr
 34
 35
 36def _swig_setattr_nondynamic_class_variable(set):
 37    def set_class_attr(cls, name, value):
 38        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
 39            set(cls, name, value)
 40        else:
 41            raise AttributeError("You cannot add class attributes to %s" % cls)
 42    return set_class_attr
 43
 44
 45def _swig_add_metaclass(metaclass):
 46    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
 47    def wrapper(cls):
 48        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
 49    return wrapper
 50
 51
 52class _SwigNonDynamicMeta(type):
 53    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
 54    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
 55
 56
 57LOGIN_NAME_MAX = _userenv.LOGIN_NAME_MAX
 58r"""*"""
 59class rtems_user_env_t(object):
 60    r"""User environment."""
 61
 62    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 63    __repr__ = _swig_repr
 64    current_directory = property(_userenv.rtems_user_env_t_current_directory_get, _userenv.rtems_user_env_t_current_directory_set, doc=r"""The anchor directory for relative paths.""")
 65    root_directory = property(_userenv.rtems_user_env_t_root_directory_get, _userenv.rtems_user_env_t_root_directory_set, doc=r"""The anchor directory for absolute paths.""")
 66    umask = property(_userenv.rtems_user_env_t_umask_get, _userenv.rtems_user_env_t_umask_set, doc=r"""The file mode creation mask.""")
 67    uid = property(_userenv.rtems_user_env_t_uid_get, _userenv.rtems_user_env_t_uid_set, doc=r"""The real user ID.""")
 68    gid = property(_userenv.rtems_user_env_t_gid_get, _userenv.rtems_user_env_t_gid_set, doc=r"""The real group ID.""")
 69    euid = property(_userenv.rtems_user_env_t_euid_get, _userenv.rtems_user_env_t_euid_set, doc=r"""The effective user ID.""")
 70    egid = property(_userenv.rtems_user_env_t_egid_get, _userenv.rtems_user_env_t_egid_set, doc=r"""The effective group ID.""")
 71    login_buffer = property(_userenv.rtems_user_env_t_login_buffer_get, _userenv.rtems_user_env_t_login_buffer_set, doc=r"""The login buffer.""")
 72    pgrp = property(_userenv.rtems_user_env_t_pgrp_get, _userenv.rtems_user_env_t_pgrp_set, doc=r"""The process group ID.""")
 73    ngroups = property(_userenv.rtems_user_env_t_ngroups_get, _userenv.rtems_user_env_t_ngroups_set, doc=r"""The count of supplementary group IDs.""")
 74    groups = property(_userenv.rtems_user_env_t_groups_get, _userenv.rtems_user_env_t_groups_set, doc=r"""The list of supplementary group IDs.""")
 75
 76    def __init__(self):
 77        r"""__init__(rtems_user_env_t self) -> rtems_user_env_t"""
 78        _userenv.rtems_user_env_t_swiginit(self, _userenv.new_rtems_user_env_t())
 79    __swig_destroy__ = _userenv.delete_rtems_user_env_t
 80
 81# Register rtems_user_env_t in _userenv:
 82_userenv.rtems_user_env_t_swigregister(rtems_user_env_t)
 83
 84def rtems_current_user_env_get():
 85    r"""
 86    Fetch the pointer to the current user environment.
 87
 88    If the task has a private user environment the pointer to it will be
 89    returned. Otherwise the pointer to rtems_global_user_env will be returned.
 90    """
 91    return _userenv.rtems_current_user_env_get()
 92
 93def rtems_libio_set_private_env():
 94    r"""
 95    Creates a private environment.
 96
 97    If the task has already a private environment nothing will be changed.  This
 98    function must be called from normal thread context and may block on a mutex.
 99    Thread dispatching is disabled to protect some critical sections.
100
101    The private environment internally uses a POSIX key. The key is added to the
102    configuration implicitly. But for each thread that uses a private environment
103    a key value pair has to be configured by the application. If only the global
104    environment is used there is no need to configure a key value pair.
105    """
106    return _userenv.rtems_libio_set_private_env()
107
108def rtems_libio_use_global_env():
109    r"""
110    Use the global environment.
111
112    A private environment will be released.  This function may be called from
113    every thread context.  Thread dispatching is disabled to protect the
114    critical sections.
115    """
116    return _userenv.rtems_libio_use_global_env()
117
118def rtems_current_user_env_getgroups():
119    r"""
120    Gets the supplementary group IDs using the current user ID and
121    updates the table of supplementary group IDs in the current user
122    environment.
123
124    In case of an error, the count of supplementary group IDs is set to zero.
125    """
126    return _userenv.rtems_current_user_env_getgroups()
127
128cvar = _userenv.cvar
LOGIN_NAME_MAX = See C documentation

*

class rtems_user_env_t:
60class rtems_user_env_t(object):
61    r"""User environment."""
62
63    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
64    __repr__ = _swig_repr
65    current_directory = property(_userenv.rtems_user_env_t_current_directory_get, _userenv.rtems_user_env_t_current_directory_set, doc=r"""The anchor directory for relative paths.""")
66    root_directory = property(_userenv.rtems_user_env_t_root_directory_get, _userenv.rtems_user_env_t_root_directory_set, doc=r"""The anchor directory for absolute paths.""")
67    umask = property(_userenv.rtems_user_env_t_umask_get, _userenv.rtems_user_env_t_umask_set, doc=r"""The file mode creation mask.""")
68    uid = property(_userenv.rtems_user_env_t_uid_get, _userenv.rtems_user_env_t_uid_set, doc=r"""The real user ID.""")
69    gid = property(_userenv.rtems_user_env_t_gid_get, _userenv.rtems_user_env_t_gid_set, doc=r"""The real group ID.""")
70    euid = property(_userenv.rtems_user_env_t_euid_get, _userenv.rtems_user_env_t_euid_set, doc=r"""The effective user ID.""")
71    egid = property(_userenv.rtems_user_env_t_egid_get, _userenv.rtems_user_env_t_egid_set, doc=r"""The effective group ID.""")
72    login_buffer = property(_userenv.rtems_user_env_t_login_buffer_get, _userenv.rtems_user_env_t_login_buffer_set, doc=r"""The login buffer.""")
73    pgrp = property(_userenv.rtems_user_env_t_pgrp_get, _userenv.rtems_user_env_t_pgrp_set, doc=r"""The process group ID.""")
74    ngroups = property(_userenv.rtems_user_env_t_ngroups_get, _userenv.rtems_user_env_t_ngroups_set, doc=r"""The count of supplementary group IDs.""")
75    groups = property(_userenv.rtems_user_env_t_groups_get, _userenv.rtems_user_env_t_groups_set, doc=r"""The list of supplementary group IDs.""")
76
77    def __init__(self):
78        r"""__init__(rtems_user_env_t self) -> rtems_user_env_t"""
79        _userenv.rtems_user_env_t_swiginit(self, _userenv.new_rtems_user_env_t())
80    __swig_destroy__ = _userenv.delete_rtems_user_env_t

User environment.

rtems_user_env_t()
77    def __init__(self):
78        r"""__init__(rtems_user_env_t self) -> rtems_user_env_t"""
79        _userenv.rtems_user_env_t_swiginit(self, _userenv.new_rtems_user_env_t())

__init__(rtems_user_env_t self) -> rtems_user_env_t

thisown
63    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

The membership flag

current_directory
root_directory
umask
uid
gid
euid
egid
login_buffer
pgrp
ngroups
groups
def rtems_current_user_env_get():
85def rtems_current_user_env_get():
86    r"""
87    Fetch the pointer to the current user environment.
88
89    If the task has a private user environment the pointer to it will be
90    returned. Otherwise the pointer to rtems_global_user_env will be returned.
91    """
92    return _userenv.rtems_current_user_env_get()

Fetch the pointer to the current user environment.

If the task has a private user environment the pointer to it will be returned. Otherwise the pointer to rtems_global_user_env will be returned.

def rtems_libio_set_private_env():
 94def rtems_libio_set_private_env():
 95    r"""
 96    Creates a private environment.
 97
 98    If the task has already a private environment nothing will be changed.  This
 99    function must be called from normal thread context and may block on a mutex.
100    Thread dispatching is disabled to protect some critical sections.
101
102    The private environment internally uses a POSIX key. The key is added to the
103    configuration implicitly. But for each thread that uses a private environment
104    a key value pair has to be configured by the application. If only the global
105    environment is used there is no need to configure a key value pair.
106    """
107    return _userenv.rtems_libio_set_private_env()

Creates a private environment.

If the task has already a private environment nothing will be changed. This function must be called from normal thread context and may block on a mutex. Thread dispatching is disabled to protect some critical sections.

The private environment internally uses a POSIX key. The key is added to the configuration implicitly. But for each thread that uses a private environment a key value pair has to be configured by the application. If only the global environment is used there is no need to configure a key value pair.

def rtems_libio_use_global_env():
109def rtems_libio_use_global_env():
110    r"""
111    Use the global environment.
112
113    A private environment will be released.  This function may be called from
114    every thread context.  Thread dispatching is disabled to protect the
115    critical sections.
116    """
117    return _userenv.rtems_libio_use_global_env()

Use the global environment.

A private environment will be released. This function may be called from every thread context. Thread dispatching is disabled to protect the critical sections.

def rtems_current_user_env_getgroups():
119def rtems_current_user_env_getgroups():
120    r"""
121    Gets the supplementary group IDs using the current user ID and
122    updates the table of supplementary group IDs in the current user
123    environment.
124
125    In case of an error, the count of supplementary group IDs is set to zero.
126    """
127    return _userenv.rtems_current_user_env_getgroups()

Gets the supplementary group IDs using the current user ID and updates the table of supplementary group IDs in the current user environment.

In case of an error, the count of supplementary group IDs is set to zero.

cvar = See C documentation