KDK_UN_INHIBIT_LOCKSCREEN(3) Library Functions Manual KDK_UN_INHIBIT_LOCKSCREEN(3)

kdk_un_inhibit_lockscreen - 设置禁止锁屏

#include <libkylockscreen.h>

extern int kdk_un_inhibit_lockscreen(uint32_t flag);

Link with -lkypowermanagement.

The main function of the interface is to undisable the lock screen.

The argument flag is the return value of the kdk_set_inhibit_lockscreen interface.

On success, return 0.

On error, return -1.

#include <libkylockscreen.h>
#include <stdio.h>
int main(void)
{
    char appName[] = "test-package";
    char reason[] = "test-reason";
    uint32_t flag;
    if ((flag = kdk_set_inhibit_lockscreen(appName , reason)) == 0) {
        printf("set inhibit lock screen fail !0);
        return -1;
    }
    if (kdk_un_inhibit_lockscreen(flag)) {
        printf("un inhibit lock screen fail !0);
        return -1;
    }
    return 0;
}

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_set_inhibit_lockscreen().

kdk_set_inhibit_lockscreen(3).

Mon Sep 18 2023 Linux Programmer's Manual