[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1


pmlib_register_application Subroutine

Purpose

Registers or unregister a PM aware application

Library

PM (Power Management) Library (libpm.a)

Syntax

#include <pmlib.h>

int pmlib_register_application(cmd);
int cmd;

Parameters


cmd Determines the action to be taken by the pmlib_register_application subroutine and is one of the following values:

PMLIB_REGISTER
Registers an application.

PMLIB_UNREGISTER
Unregisters an application.

Description

The pmlib_register_application registers or unregisters the caller process as a PM-aware application. The pmlib_register_application subroutine can be called by any user.

Return Values

Upon successful completion, PMLIB_SUCCESS is returned. If the pmlib_request_state subroutine fails, PMLIB_ERROR is returned and errno variable is set to an error code.

Error Codes


ESRCH PM daemon is not running.
EINVAL Invalid argument.

Implementation Specifics

The pmlib_register_application subroutine is part of the Base Operation System (BOS) Runtime.

Related Information

The pmlib_get_event_notice (pmlib_get_event_notice Subroutine) subroutine, pmlib_request_state (pmlib_request_state Subroutine) subroutine, pmlib_request_battery (pmlib_request_battery Subroutine) subroutine, pmlib_request_parameter (pmlib_request_parameter Subroutine) subroutine.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]