glirc-2.26: Console IRC client

Copyright(c) Eric Mertens 2016
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Client.CApi.Exports

Contents

Description

This module exports the C functions that extensions can used to query the state of the client.

Synopsis

Extension API types

type Glirc_send_message Source #

Arguments

 = Ptr ()

api token

-> Ptr FgnMsg

pointer to message

-> IO CInt

0 on success

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 #

Arguments

 = Ptr ()

api token

-> 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_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 #

Arguments

 = Ptr ()

api token

-> CString

network name

-> CSize

network name length

-> IO CString 

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_is_channel Source #

Arguments

 = Ptr ()

api token

-> CString

network name

-> CSize

network length

-> CString

target name

-> CSize

target length

-> IO CInt

boolean

Returns 1 when the given target on the given network is a channel name, otherwise returns 0.

If the given network is not currently active this returns 0.

type Glirc_is_logged_on Source #

Arguments

 = Ptr ()

api token

-> CString

network name

-> CSize

network length

-> CString

target name

-> CSize

target length

-> IO CInt

boolean

Returns 1 when the given target on the given network shares a channel with the user, 0 otherwise.

If the given network is not currently active this returns 0.

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.

type Glirc_current_focus Source #

Arguments

 = Ptr ()

api token

-> Ptr CString

newly allocated network string

-> Ptr CSize

network length

-> Ptr CString

newly allocated target string

-> Ptr CSize

target length

-> IO () 

Free an array of heap allocated strings found as a return value from the extension API. If argument is NULL, nothing happens.

Free the allocated strings with glirc_free_string

Strings set to NULL if there is no current network or no current target.

type Glirc_free_string Source #

Arguments

 = CString

glirc allocated string

-> IO () 

Free one of the heap allocated strings found as a return value from the extension API. If argument is NULL, nothing happens.

type Glirc_free_strings Source #

Arguments

 = Ptr CString

glirc allocated strings, null-terminated

-> IO () 

Free an array of heap allocated strings found as a return value from the extension API. If argument is NULL, nothing happens.

type Glirc_inject_chat Source #

Arguments

 = Ptr ()

api token

-> CString

network

-> CSize

network length

-> CString

source

-> CSize

source length

-> CString

target

-> CSize

target length

-> CString

message

-> CSize

message length

-> IO CInt

0 on success

Print a message or error to the client window