-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused code, add API documentation
- Loading branch information
Showing
4 changed files
with
74 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# macrodevice Lua API | ||
|
||
## ``macrodevice.drop_root(uid, gid)`` | ||
uid: integer, gid: integer | ||
|
||
Drops root permissions by setting the real and effective user and group ids to uid and gid. | ||
|
||
Returns 1 in case of failure, otherwise 0 | ||
|
||
## ``macrodevice.drop_root(username)`` | ||
username: string | ||
|
||
Drops root permissions by setting the real and effective user and group ids to uid and gid of the user with the given username. | ||
|
||
Returns 1 in case of failure, otherwise 0 | ||
|
||
## ``macrodevice.open(backend, settings, event_handler)`` | ||
backend: string, settings: table, event_handler: function | ||
|
||
Opens the device specified by the settings table using the given backend. event_handler is the callback function that gets called for every incoming event. | ||
|
||
## ``macrodevice.version`` | ||
A string containing the version of macrodevice. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters