| Copyright | (c) Eric Mertens, 2016 |
|---|---|
| License | ISC |
| Maintainer | emertens@gmail.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Client.CApi.Exports
Contents
Description
This module exports the C functions that extensions can used to query the state of the client.
- type Glirc_send_message = Ptr () -> Ptr FgnMsg -> IO CInt
- type Glirc_print = Ptr () -> MessageCode -> CString -> CSize -> IO CInt
- type Glirc_list_networks = Ptr () -> IO (Ptr CString)
- type Glirc_list_channels = Ptr () -> CString -> CSize -> IO (Ptr CString)
- type Glirc_list_channel_users = Ptr () -> CString -> CSize -> CString -> CSize -> IO (Ptr CString)
- type Glirc_my_nick = Ptr () -> CString -> CSize -> IO CString
- type Glirc_identifier_cmp = CString -> CSize -> CString -> CSize -> IO CInt
- type Glirc_mark_seen = Ptr () -> CString -> CSize -> CString -> CSize -> IO ()
- type Glirc_clear_window = Ptr () -> CString -> CSize -> CString -> CSize -> IO ()
Extension API types
type Glirc_send_message Source #
Network, command, and parameters are used when transmitting a message.
type Glirc_print Source #
Arguments
| = Ptr () | api token |
| -> MessageCode | enum message_code |
| -> CString | message |
| -> CSize | message length |
| -> IO CInt | 0 on success |
Print a message or error to the client window
type Glirc_list_networks Source #
The resulting strings and array of strings are malloc'd and the caller must free them. NULL returned on failure.
type Glirc_list_channels Source #
Arguments
| = Ptr () | api token |
| -> CString | network |
| -> CSize | network len |
| -> IO (Ptr CString) | null terminated array of null terminated strings |
The resulting strings and array of strings are malloc'd and the caller must free them. NULL returned on failure.
type Glirc_list_channel_users Source #
Arguments
| = Ptr () | api token |
| -> CString | network |
| -> CSize | network len |
| -> CString | channel |
| -> CSize | channel len |
| -> IO (Ptr CString) | null terminated array of null terminated strings |
The resulting strings and array of strings are malloc'd and the caller must free them. NULL returned on failure.
type Glirc_my_nick Source #
The resulting string is malloc'd and the caller must free it. NULL returned on failure.
type Glirc_identifier_cmp Source #
Arguments
| = CString | identifier 1 |
| -> CSize | identifier 1 len |
| -> CString | identifier 2 |
| -> CSize | identifier 2 len |
| -> IO CInt |
Case insensitive comparison suitable for use on channels and nicknames. Returns -1 if the first identifier is less than the second Returns 0 if the first identifier is equal to the second Returns 1 if the first identifier is greater than the second
type Glirc_mark_seen Source #
Arguments
| = Ptr () | api token |
| -> CString | network name |
| -> CSize | network name length |
| -> CString | channel name |
| -> CSize | channel name length |
| -> IO () |
Mark a window as being seen clearing the new message counter. To clear the client window send an empty network name. To clear a network window send an empty channel name.
type Glirc_clear_window Source #
Arguments
| = Ptr () | api token |
| -> CString | network name |
| -> CSize | network name length |
| -> CString | channel name |
| -> CSize | channel name length |
| -> IO () |
Mark a window as being seen clearing the new message counter. To clear the client window send an empty network name. To clear a network window send an empty channel name.