tgl

package
v0.0.0-...-361b1ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2015 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Callbacks exposed in Go-like style.

We need to declare this callbacks in another file because we are declaring them with cgo export keyword to be used in the C part. At the moment we are following exactly the callbacks functions signature defined in tgl library.

Functions signature can be checked in callbacks.c.

Telegram Go library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChatUpdateCB

func ChatUpdateCB(TLS *C.struct_tgl_state, C *C.struct_tgl_chat, flags uint)

func CreatePrintNameCB

func CreatePrintNameCB(TLS *C.struct_tgl_state, id C.tgl_peer_id_t, a1 *C.char, a2 *C.char, a3 *C.char, a4 *C.char) *C.char

func GetStringCB

func GetStringCB(TLS *C.struct_tgl_state, prompt *C.char, flags int)

func LogPrintfCB

func LogPrintfCB(TLS *C.struct_tgl_state)

func LoggedInCB

func LoggedInCB(TLS *C.struct_tgl_state)

func MainLoop

func MainLoop(TLS *C.struct_tgl_state)

func MarkedReadCB

func MarkedReadCB(TLS *C.struct_tgl_state, num int, list **C.struct_tgl_message)

func MsgReceiveCB

func MsgReceiveCB(TLS *C.struct_tgl_state, M *C.struct_tgl_message)

func NewAuthorizationCB

func NewAuthorizationCB(TLS *C.struct_tgl_state, device *C.char, location *C.char)

func NewMsgCB

func NewMsgCB(TLS *C.struct_tgl_state, M *C.struct_tgl_message)

func NotificationCB

func NotificationCB(TLS *C.struct_tgl_state, t *C.char, message *C.char)

func OurIdCB

func OurIdCB(TLS *C.struct_tgl_state, id int)

func SecretChatUpdateCB

func SecretChatUpdateCB(TLS *C.struct_tgl_state, C *C.struct_tgl_secret_chat, flags uint)

func StartedCB

func StartedCB(TLS *C.struct_tgl_state)

func StatusNotificationCB

func StatusNotificationCB(TLS *C.struct_tgl_state, U *C.struct_tgl_user)

func TypeInChatNotificationCB

func TypeInChatNotificationCB(TLS *C.struct_tgl_state, U *C.struct_tgl_user, C *C.struct_tgl_chat, status C.enum_tgl_typing_status)

func TypeInSecretChatNotificationCB

func TypeInSecretChatNotificationCB(TLS *C.struct_tgl_state, E *C.struct_tgl_secret_chat)

func TypeNotificationCB

func TypeNotificationCB(TLS *C.struct_tgl_state, U *C.struct_tgl_user, status C.enum_tgl_typing_status)

func UserActivatedCB

func UserActivatedCB(TLS *C.struct_tgl_state, U *C.struct_tgl_user)

func UserRegisteredCB

func UserRegisteredCB(TLS *C.struct_tgl_state, U *C.struct_tgl_user)

func UserStatusUpdate

func UserStatusUpdate(TLS *C.struct_tgl_state, U *C.struct_tgl_user)

func UserUpdateCB

func UserUpdateCB(TLS *C.struct_tgl_state, C *C.struct_tgl_user, flags uint)

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(state *State) *Config

NewState creates a new State struct.

func (*Config) Destroy

func (c *Config) Destroy()

type Interface

type Interface struct {
	// contains filtered or unexported fields
}

func NewInterface

func NewInterface(state *State) (*Interface, error)

func (*Interface) Callback

func (i *Interface) Callback()

func (*Interface) Destroy

func (i *Interface) Destroy()

func (*Interface) Ev

func (i *Interface) Ev()

func (*Interface) Net

func (i *Interface) Net()

func (*Interface) Timer

func (i *Interface) Timer()

type State

type State struct {
	// contains filtered or unexported fields
}

State wraps a tgl_state struct.

func NewState

func NewState() *State

NewState creates a new State struct.

func (*State) Destroy

func (s *State) Destroy()

Destroy destroys the state struct.

func (*State) Dial

func (s *State) Dial() *error

func (*State) EnableCallbacks

func (s *State) EnableCallbacks()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL