gotox

package module
v0.0.0-...-95317dd Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: GPL-3.0 Imports: 7 Imported by: 3

README

gotox

GoDoc

gotox is a Go wrapper for the c-toxcore library.

Pull requests, bug reportings and feature requests (via github issues) are always welcome. :)

For a list of supported toxcore features see PROGRESS.md.

Installation

First, install the c-toxcore library.

Next, download go-tox using go:

go get github.com/codedust/go-tox

License

gotox is licensed under the GPLv3.

How to use

See bindings.go for details about supported API functions and callbacks.go for the supported callbacks.

The best place to get started are the examples in examples/.

go run examples/example.go

Feel free to ask for help in the issue tracker. ;)

Documentation

Index

Constants

View Source
const (
	TOX_PUBLIC_KEY_SIZE           = C.TOX_PUBLIC_KEY_SIZE
	TOX_SECRET_KEY_SIZE           = C.TOX_SECRET_KEY_SIZE
	TOX_ADDRESS_SIZE              = C.TOX_ADDRESS_SIZE
	TOX_MAX_NAME_LENGTH           = C.TOX_MAX_NAME_LENGTH
	TOX_MAX_STATUS_MESSAGE_LENGTH = C.TOX_MAX_STATUS_MESSAGE_LENGTH
	TOX_MAX_FRIEND_REQUEST_LENGTH = C.TOX_MAX_FRIEND_REQUEST_LENGTH
	TOX_MAX_MESSAGE_LENGTH        = C.TOX_MAX_MESSAGE_LENGTH
	TOX_MAX_CUSTOM_PACKET_SIZE    = C.TOX_MAX_CUSTOM_PACKET_SIZE
	TOX_HASH_LENGTH               = C.TOX_HASH_LENGTH
	TOX_FILE_ID_LENGTH            = C.TOX_FILE_ID_LENGTH
	TOX_MAX_FILENAME_LENGTH       = C.TOX_MAX_FILENAME_LENGTH
)

Variables

View Source
var (
	ErrToxNew   = errors.New("Error initializing Tox")
	ErrToxInit  = errors.New("Tox not initialized")
	ErrArgs     = errors.New("Nil arguments or wrong size")
	ErrFuncFail = errors.New("Function failed")
	ErrUnknown  = errors.New("An unknown error occoured")
)
=== Errors ===

General errors

View Source
var (
	ErrNewMalloc        = errors.New("Memory allocation failed")
	ErrNewPortAlloc     = errors.New("Could not bind to port")
	ErrNewProxy         = errors.New("Invalid proxy configuration")
	ErrNewLoadEnc       = errors.New("The savedata is encrypted")
	ErrNewLoadBadFormat = errors.New("The savedata format is invalid")
)
View Source
var (
	ErrFriendAddTooLong      = errors.New("Message too long")
	ErrFriendAddNoMessage    = errors.New("Empty message")
	ErrFriendAddOwnKey       = errors.New("Own key")
	ErrFriendAddAlreadySent  = errors.New("Already sent")
	ErrFriendAddBadChecksum  = errors.New("Bad checksum in address")
	ErrFriendAddSetNewNospam = errors.New("Different nospam")
	ErrFriendAddNoMem        = errors.New("Failed increasing friend list")
)
View Source
var (
	ErrFileSendInvalidFileID = errors.New("The size of the given FileID is invalid.")
)

Functions

func VersionIsCompatible

func VersionIsCompatible(major uint32, minor uint32, patch uint32) bool

VersionIsCompatible returns whether the compiled Tox library version is * compatible with the passed version numbers.

func VersionMajor

func VersionMajor() uint32

VersionMajor returns the major version number of the used Tox library

func VersionMinor

func VersionMinor() uint32

VersionMinor returns the minor version number of the used Tox library

func VersionPatch

func VersionPatch() uint32

VersionPatch returns the patch number of the used Tox library

Types

type OnFileChunkRequest

type OnFileChunkRequest func(tox *Tox, friendnumber uint32, filenumber uint32, position uint64, length uint64)

This event is triggered when Core is ready to send more file data.

type OnFileRecv

type OnFileRecv func(tox *Tox, friendnumber uint32, filenumber uint32, kind ToxFileKind, filesize uint64, filename string)

This event is triggered when a file transfer request is received.

type OnFileRecvChunk

type OnFileRecvChunk func(tox *Tox, friendnumber uint32, filenumber uint32, position uint64, data []byte)

This event is first triggered when a file transfer request is received, and * subsequently when a chunk of file data for an accepted request was received.

type OnFileRecvControl

type OnFileRecvControl func(tox *Tox, friendnumber uint32, filenumber uint32, filecontrol ToxFileControl)

This event is triggered when a file control command is received from a * friend.

type OnFriendConnectionStatusChanges

type OnFriendConnectionStatusChanges func(tox *Tox, friendnumber uint32, connectionstatus ToxConnection)

This event is triggered when a friend goes offline after having been online, * or when a friend goes online. * * This callback is not called when adding friends. It is assumed that when * adding friends, their connection status is initially offline.

type OnFriendLosslessPacket

type OnFriendLosslessPacket func(tox *Tox, friendnumber uint32, data []byte)

This event is triggered when a lossless packet is received from a friend.

type OnFriendLossyPacket

type OnFriendLossyPacket func(tox *Tox, friendnumber uint32, data []byte)

This event is triggered when a lossy packet is received from a friend.

type OnFriendMessage

type OnFriendMessage func(tox *Tox, friendnumber uint32, messagetype ToxMessageType, message string)

This event is triggered when a message from a friend is received.

type OnFriendNameChanges

type OnFriendNameChanges func(tox *Tox, friendnumber uint32, name string)

This event is triggered when a friend changes their name.

type OnFriendReadReceipt

type OnFriendReadReceipt func(tox *Tox, friendnumber uint32, messageid uint32)

This event is triggered when the friend receives the message with the * corresponding message ID.

type OnFriendRequest

type OnFriendRequest func(tox *Tox, publickey []byte, message string)

This event is triggered when a friend request is received.

type OnFriendStatusChanges

type OnFriendStatusChanges func(tox *Tox, friendnumber uint32, userstatus ToxUserStatus)

This event is triggered when a friend changes their user status.

type OnFriendStatusMessageChanges

type OnFriendStatusMessageChanges func(tox *Tox, friendnumber uint32, message string)

This event is triggered when a friend changes their status message.

type OnFriendTypingChanges

type OnFriendTypingChanges func(tox *Tox, friendnumber uint32, istyping bool)

This event is triggered when a friend starts or stops typing.

type OnSelfConnectionStatusChanges

type OnSelfConnectionStatusChanges func(tox *Tox, status ToxConnection)

This event is triggered whenever there is a change in the DHT connection * state. When disconnected, a client may choose to call tox_bootstrap again, to * reconnect to the DHT. Note that this state may frequently change for short * amounts of time. Clients should therefore not immediately bootstrap on * receiving a disconnect.

type Options

type Options struct {
	/* The type of socket to create.
	 * If IPv6Enabled is true, both IPv6 and IPv4 connections are allowed.
	 */
	IPv6Enabled bool

	/* Enable the use of UDP communication when available.
	 *
	 * Setting this to false will force Tox to use TCP only. Communications will
	 * need to be relayed through a TCP relay node, potentially slowing them down.
	 * Disabling UDP support is necessary when using anonymous proxies or Tor.
	 */
	UDPEnabled bool

	/* The type of the proxy (PROXY_TYPE_NONE, PROXY_TYPE_HTTP or PROXY_TYPE_SOCKS5). */
	ProxyType ToxProxyType

	/* The IP address or DNS name of the proxy to be used. */
	ProxyHost string

	/* The port to use to connect to the proxy server. */
	ProxyPort uint16

	/* The start port of the inclusive port range to attempt to use. */
	StartPort uint16

	/* The end port of the inclusive port range to attempt to use. */
	EndPort uint16

	/* The port to use for the TCP server. If 0, the tcp server is disabled. */
	TcpPort uint16

	/* The type of savedata to load from. */
	SaveDataType ToxSaveDataType

	/* The savedata. */
	SaveData []byte
}

type Tox

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

Tox is the main struct.

func New

func New(options *Options) (*Tox, error)

New creates and initialises a new Tox instance and returns the corresponding * gotox instance.

func (*Tox) AddTCPRelay

func (t *Tox) AddTCPRelay(address string, port uint16, publickey []byte) error

AddTCPRelay adds the given node with IP, port, and public key without using * it as a boostrap node.

func (*Tox) Bootstrap

func (t *Tox) Bootstrap(address string, port uint16, publickey []byte) error

Bootstrap sends a "get nodes" request to the given bootstrap node with IP, * port, and public key to setup connections.

func (*Tox) CallbackFileChunkRequest

func (t *Tox) CallbackFileChunkRequest(f OnFileChunkRequest)

func (*Tox) CallbackFileRecv

func (t *Tox) CallbackFileRecv(f OnFileRecv)

func (*Tox) CallbackFileRecvChunk

func (t *Tox) CallbackFileRecvChunk(f OnFileRecvChunk)

func (*Tox) CallbackFileRecvControl

func (t *Tox) CallbackFileRecvControl(f OnFileRecvControl)

func (*Tox) CallbackFriendConnectionStatusChanges

func (t *Tox) CallbackFriendConnectionStatusChanges(f OnFriendConnectionStatusChanges)

func (*Tox) CallbackFriendLosslessPacket

func (t *Tox) CallbackFriendLosslessPacket(f OnFriendLosslessPacket)

func (*Tox) CallbackFriendLossyPacket

func (t *Tox) CallbackFriendLossyPacket(f OnFriendLossyPacket)

func (*Tox) CallbackFriendMessage

func (t *Tox) CallbackFriendMessage(f OnFriendMessage)

func (*Tox) CallbackFriendNameChanges

func (t *Tox) CallbackFriendNameChanges(f OnFriendNameChanges)

func (*Tox) CallbackFriendReadReceipt

func (t *Tox) CallbackFriendReadReceipt(f OnFriendReadReceipt)

func (*Tox) CallbackFriendRequest

func (t *Tox) CallbackFriendRequest(f OnFriendRequest)

func (*Tox) CallbackFriendStatusChanges

func (t *Tox) CallbackFriendStatusChanges(f OnFriendStatusChanges)

func (*Tox) CallbackFriendStatusMessageChanges

func (t *Tox) CallbackFriendStatusMessageChanges(f OnFriendStatusMessageChanges)

func (*Tox) CallbackFriendTypingChanges

func (t *Tox) CallbackFriendTypingChanges(f OnFriendTypingChanges)

func (*Tox) CallbackSelfConnectionStatusChanges

func (t *Tox) CallbackSelfConnectionStatusChanges(f OnSelfConnectionStatusChanges)

func (*Tox) FileControl

func (t *Tox) FileControl(friendNumber uint32, fileNumber uint32, fileControl ToxFileControl) error

FileControl sends a FileControl to a friend with the given friendNumber.

func (*Tox) FileGetFileId

func (t *Tox) FileGetFileId(friendNumber uint32, fileNumber uint32) ([]byte, error)

FileGetFileId returns the file id associated to the file transfer.

func (*Tox) FileSeek

func (t *Tox) FileSeek(friendNumber uint32, fileNumber uint32, position uint64) error

FileSeek sends a file seek control command to a friend for a given file * transfer.

func (*Tox) FileSend

func (t *Tox) FileSend(friendNumber uint32, fileKind ToxFileKind, fileLength uint64, fileID []byte, fileName string) (uint32, error)

FileSend sends a file transmission request.

func (*Tox) FileSendChunk

func (t *Tox) FileSendChunk(friendNumber uint32, fileNumber uint32, position uint64, data []byte) error

FileSendChunk sends a chunk of file data to a friend.

func (*Tox) FriendAdd

func (t *Tox) FriendAdd(address []byte, message string) (uint32, error)

FriendAdd adds a friend by sending a friend request containing the given * message. * Returns the friend number on success, or a ToxErrFriendAdd on failure.

func (*Tox) FriendAddNorequest

func (t *Tox) FriendAddNorequest(publickey []byte) (uint32, error)

FriendAddNorequest adds a friend without sending a friend request. * Returns the friend number on success.

func (*Tox) FriendByPublicKey

func (t *Tox) FriendByPublicKey(publickey []byte) (uint32, error)

FriendByPublicKey returns the friend number associated to a given publickey.

func (*Tox) FriendDelete

func (t *Tox) FriendDelete(friendNumber uint32) error

FriendDelete removes a friend.

func (*Tox) FriendExists

func (t *Tox) FriendExists(friendNumber uint32) (bool, error)

FriendExists returns true if a friend exists with given friendNumber.

func (*Tox) FriendGetConnectionStatus

func (t *Tox) FriendGetConnectionStatus(friendNumber uint32) (ToxConnection, error)

FriendGetConnectionStatus returns true if the friend is connected.

func (*Tox) FriendGetLastOnline

func (t *Tox) FriendGetLastOnline(friendNumber uint32) (time.Time, error)

FriendGetLastOnline returns the timestamp of the last time the friend with * the given friendNumber was seen online.

func (*Tox) FriendGetName

func (t *Tox) FriendGetName(friendNumber uint32) (string, error)

FriendGetName returns the name of friendNumber.

func (*Tox) FriendGetNameSize

func (t *Tox) FriendGetNameSize(friendNumber uint32) (int64, error)

FriendGetNameSize returns the length of the name of friendNumber.

func (*Tox) FriendGetPublickey

func (t *Tox) FriendGetPublickey(friendNumber uint32) ([]byte, error)

FriendGetPublickey returns the publickey associated to that friendNumber.

func (*Tox) FriendGetStatus

func (t *Tox) FriendGetStatus(friendNumber uint32) (ToxUserStatus, error)

FriendGetStatus returns the status of friendNumber.

func (*Tox) FriendGetStatusMessage

func (t *Tox) FriendGetStatusMessage(friendNumber uint32) (string, error)

FriendGetStatusMessage returns the status message of friend with the given * friendNumber.

func (*Tox) FriendGetStatusMessageSize

func (t *Tox) FriendGetStatusMessageSize(friendNumber uint32) (int64, error)

FriendGetStatusMessageSize returns the size of the status of a friend with * the given friendNumber.

func (*Tox) FriendGetTyping

func (t *Tox) FriendGetTyping(friendNumber uint32) (bool, error)

FriendGetTyping returns true if friendNumber is typing.

func (*Tox) FriendSendLosslessPacket

func (t *Tox) FriendSendLosslessPacket(friendNumber uint32, data []byte) error

FriendSendLosslessPacket sends a custom lossless packet to a friend. * The first byte of data must be in the range 160-191. Maximum length of a * custom packet is TOX_MAX_CUSTOM_PACKET_SIZE.

func (*Tox) FriendSendLossyPacket

func (t *Tox) FriendSendLossyPacket(friendNumber uint32, data []byte) error

FriendSendLossyPacket sends a custom lossy packet to a friend. * The first byte of data must be in the range 200-254. Maximum length of a * custom packet is TOX_MAX_CUSTOM_PACKET_SIZE.

func (*Tox) FriendSendMessage

func (t *Tox) FriendSendMessage(friendNumber uint32, messagetype ToxMessageType, message string) (uint32, error)

FriendSendMessage sends a message to a friend if he/she is online. * Maximum message length is MAX_MESSAGE_LENGTH. * messagetype is the type of the message (normal, action, ...). * Returns the message ID if successful, an error otherwise.

func (*Tox) GetSaveDataSize

func (t *Tox) GetSaveDataSize() (uint32, error)

GetSaveDataSize returns the size of the savedata returned by GetSavedata.

func (*Tox) GetSavedata

func (t *Tox) GetSavedata() ([]byte, error)

GetSavedata returns a byte slice of all information associated with the tox * instance.

func (*Tox) Hash

func (t *Tox) Hash(data []byte) ([]byte, error)

Hash generates a cryptographic hash of the given data (can be used to cache * avatars).

func (*Tox) Iterate

func (t *Tox) Iterate() error

Iterate is the main loop. It needs to be called every IterationInterval() * milliseconds.

func (*Tox) IterationInterval

func (t *Tox) IterationInterval() (uint32, error)

IterationInterval returns the time in milliseconds before Iterate() should be * called again.

func (*Tox) Kill

func (t *Tox) Kill() error

Kill releases all resources associated with the Tox instance and disconnects * from the network. * After calling this function `t *TOX` becomes invalid. Do not use it again!

func (*Tox) SelfGetAddress

func (t *Tox) SelfGetAddress() ([]byte, error)

SelfGetAddress returns the public address to give to others.

func (*Tox) SelfGetConnectionStatus

func (t *Tox) SelfGetConnectionStatus() (ToxConnection, error)

SelfGetConnectionStatus returns true if Tox is connected to the DHT.

func (*Tox) SelfGetDhtId

func (t *Tox) SelfGetDhtId() ([]byte, error)

SelfGetDhtId returns the temporary DHT public key of this instance.

func (*Tox) SelfGetFriendlist

func (t *Tox) SelfGetFriendlist() ([]uint32, error)

SelfGetFriendlist returns a slice of uint32 containing the friendNumbers.

func (*Tox) SelfGetFriendlistSize

func (t *Tox) SelfGetFriendlistSize() (int64, error)

SelfGetFriendlistSize returns the number of friends on the friendlist.

func (*Tox) SelfGetName

func (t *Tox) SelfGetName() (string, error)

SelfGetName returns your nickname.

func (*Tox) SelfGetNameSize

func (t *Tox) SelfGetNameSize() (int64, error)

SelfGetNameSize returns the length of your name.

func (*Tox) SelfGetNospam

func (t *Tox) SelfGetNospam() (uint32, error)

SelfGetNospam returns the nospam of your ID.

func (*Tox) SelfGetPublicKey

func (t *Tox) SelfGetPublicKey() ([]byte, error)

SelfGetPublicKey returns the publickey of your profile.

func (*Tox) SelfGetSecretKey

func (t *Tox) SelfGetSecretKey() ([]byte, error)

SelfGetSecretKey returns the secretkey of your profile.

func (*Tox) SelfGetStatus

func (t *Tox) SelfGetStatus() (ToxUserStatus, error)

SelfGetStatus returns your status.

func (*Tox) SelfGetStatusMessage

func (t *Tox) SelfGetStatusMessage() (string, error)

SelfGetStatusMessage returns your status message.

func (*Tox) SelfGetStatusMessageSize

func (t *Tox) SelfGetStatusMessageSize() (int64, error)

SelfGetStatusMessageSize returns the size of your status message.

func (*Tox) SelfGetTCPPort

func (t *Tox) SelfGetTCPPort() (uint16, error)

SelfGetTCPPort returns the TCP port the Tox instance is bound to. This is * only relevant if the instance is acting as a TCP relay.

func (*Tox) SelfGetUDPPort

func (t *Tox) SelfGetUDPPort() (uint16, error)

SelfGetUDPPort returns the UDP port the Tox instance is bound to.

func (*Tox) SelfSetName

func (t *Tox) SelfSetName(name string) error

SelfSetName sets your nickname. The maximum name length is MAX_NAME_LENGTH.

func (*Tox) SelfSetNospam

func (t *Tox) SelfSetNospam(nospam uint32) error

SelfSetNospam sets the nospam of your ID.

func (*Tox) SelfSetStatus

func (t *Tox) SelfSetStatus(userstatus ToxUserStatus) error

SelfSetStatus sets your userstatus.

func (*Tox) SelfSetStatusMessage

func (t *Tox) SelfSetStatusMessage(status string) error

SelfSetStatusMessage sets your status message. * The maximum status length is MAX_STATUS_MESSAGE_LENGTH.

func (*Tox) SelfSetTyping

func (t *Tox) SelfSetTyping(friendNumber uint32, typing bool) error

SelfSetTyping sets your typing status to a friend.

type ToxConnection

type ToxConnection C.enum_TOX_CONNECTION
const (
	TOX_CONNECTION_NONE ToxConnection = C.TOX_CONNECTION_NONE
	TOX_CONNECTION_TCP  ToxConnection = C.TOX_CONNECTION_TCP
	TOX_CONNECTION_UDP  ToxConnection = C.TOX_CONNECTION_UDP
)

type ToxErrBootstrap

type ToxErrBootstrap C.enum_TOX_ERR_BOOTSTRAP
const (
	TOX_ERR_BOOTSTRAP_OK       ToxErrBootstrap = C.TOX_ERR_BOOTSTRAP_OK
	TOX_ERR_BOOTSTRAP_NULL     ToxErrBootstrap = C.TOX_ERR_BOOTSTRAP_NULL
	TOX_ERR_BOOTSTRAP_BAD_HOST ToxErrBootstrap = C.TOX_ERR_BOOTSTRAP_BAD_HOST
	TOX_ERR_BOOTSTRAP_BAD_PORT ToxErrBootstrap = C.TOX_ERR_BOOTSTRAP_BAD_PORT
)

type ToxErrFileControl

type ToxErrFileControl C.enum_TOX_ERR_FILE_CONTROL
const (
	TOX_ERR_FILE_CONTROL_OK                   ToxErrFileControl = C.TOX_ERR_FILE_CONTROL_OK
	TOX_ERR_FILE_CONTROL_FRIEND_NOT_FOUND     ToxErrFileControl = C.TOX_ERR_FILE_CONTROL_FRIEND_NOT_FOUND
	TOX_ERR_FILE_CONTROL_FRIEND_NOT_CONNECTED ToxErrFileControl = C.TOX_ERR_FILE_CONTROL_FRIEND_NOT_CONNECTED
	TOX_ERR_FILE_CONTROL_NOT_FOUND            ToxErrFileControl = C.TOX_ERR_FILE_CONTROL_NOT_FOUND
	TOX_ERR_FILE_CONTROL_NOT_PAUSED           ToxErrFileControl = C.TOX_ERR_FILE_CONTROL_NOT_PAUSED
	TOX_ERR_FILE_CONTROL_DENIED               ToxErrFileControl = C.TOX_ERR_FILE_CONTROL_DENIED
	TOX_ERR_FILE_CONTROL_ALREADY_PAUSED       ToxErrFileControl = C.TOX_ERR_FILE_CONTROL_ALREADY_PAUSED
	TOX_ERR_FILE_CONTROL_SENDQ                ToxErrFileControl = C.TOX_ERR_FILE_CONTROL_SENDQ
)

type ToxErrFileGet

type ToxErrFileGet C.enum_TOX_ERR_FILE_GET
const (
	TOX_ERR_FILE_GET_OK               ToxErrFileGet = C.TOX_ERR_FILE_GET_OK
	TOX_ERR_FILE_GET_NULL             ToxErrFileGet = C.TOX_ERR_FILE_GET_NULL
	TOX_ERR_FILE_GET_FRIEND_NOT_FOUND ToxErrFileGet = C.TOX_ERR_FILE_GET_FRIEND_NOT_FOUND
	TOX_ERR_FILE_GET_NOT_FOUND        ToxErrFileGet = C.TOX_ERR_FILE_GET_NOT_FOUND
)

type ToxErrFileSeek

type ToxErrFileSeek C.enum_TOX_ERR_FILE_SEEK
const (
	TOX_ERR_FILE_SEEK_OK                   ToxErrFileSeek = C.TOX_ERR_FILE_SEEK_OK
	TOX_ERR_FILE_SEEK_FRIEND_NOT_FOUND     ToxErrFileSeek = C.TOX_ERR_FILE_SEEK_FRIEND_NOT_FOUND
	TOX_ERR_FILE_SEEK_FRIEND_NOT_CONNECTED ToxErrFileSeek = C.TOX_ERR_FILE_SEEK_FRIEND_NOT_CONNECTED
	TOX_ERR_FILE_SEEK_NOT_FOUND            ToxErrFileSeek = C.TOX_ERR_FILE_SEEK_NOT_FOUND
	TOX_ERR_FILE_SEEK_DENIED               ToxErrFileSeek = C.TOX_ERR_FILE_SEEK_DENIED
	TOX_ERR_FILE_SEEK_INVALID_POSITION     ToxErrFileSeek = C.TOX_ERR_FILE_SEEK_INVALID_POSITION
	TOX_ERR_FILE_SEEK_SENDQ                ToxErrFileSeek = C.TOX_ERR_FILE_SEEK_SENDQ
)

type ToxErrFileSend

type ToxErrFileSend C.enum_TOX_ERR_FILE_SEND
const (
	TOX_ERR_FILE_SEND_OK                   ToxErrFileSend = C.TOX_ERR_FILE_SEND_OK
	TOX_ERR_FILE_SEND_NULL                 ToxErrFileSend = C.TOX_ERR_FILE_SEND_NULL
	TOX_ERR_FILE_SEND_FRIEND_NOT_FOUND     ToxErrFileSend = C.TOX_ERR_FILE_SEND_FRIEND_NOT_FOUND
	TOX_ERR_FILE_SEND_FRIEND_NOT_CONNECTED ToxErrFileSend = C.TOX_ERR_FILE_SEND_FRIEND_NOT_CONNECTED
	TOX_ERR_FILE_SEND_NAME_TOO_LONG        ToxErrFileSend = C.TOX_ERR_FILE_SEND_NAME_TOO_LONG
	TOX_ERR_FILE_SEND_TOO_MANY             ToxErrFileSend = C.TOX_ERR_FILE_SEND_TOO_MANY
)

type ToxErrFileSendChunk

type ToxErrFileSendChunk C.enum_TOX_ERR_FILE_SEND_CHUNK
const (
	TOX_ERR_FILE_SEND_CHUNK_OK                   ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_OK
	TOX_ERR_FILE_SEND_CHUNK_NULL                 ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_NULL
	TOX_ERR_FILE_SEND_CHUNK_FRIEND_NOT_FOUND     ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_FRIEND_NOT_FOUND
	TOX_ERR_FILE_SEND_CHUNK_FRIEND_NOT_CONNECTED ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_FRIEND_NOT_CONNECTED
	TOX_ERR_FILE_SEND_CHUNK_NOT_FOUND            ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_NOT_FOUND
	TOX_ERR_FILE_SEND_CHUNK_NOT_TRANSFERRING     ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_NOT_TRANSFERRING
	TOX_ERR_FILE_SEND_CHUNK_INVALID_LENGTH       ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_INVALID_LENGTH
	TOX_ERR_FILE_SEND_CHUNK_SENDQ                ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_SENDQ
	TOX_ERR_FILE_SEND_CHUNK_WRONG_POSITION       ToxErrFileSendChunk = C.TOX_ERR_FILE_SEND_CHUNK_WRONG_POSITION
)

type ToxErrFriendAdd

type ToxErrFriendAdd C.enum_TOX_ERR_FRIEND_ADD
const (
	TOX_ERR_FRIEND_ADD_OK             ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_OK
	TOX_ERR_FRIEND_ADD_NULL           ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_NULL
	TOX_ERR_FRIEND_ADD_TOO_LONG       ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_TOO_LONG
	TOX_ERR_FRIEND_ADD_NO_MESSAGE     ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_NO_MESSAGE
	TOX_ERR_FRIEND_ADD_OWN_KEY        ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_OWN_KEY
	TOX_ERR_FRIEND_ADD_ALREADY_SENT   ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_ALREADY_SENT
	TOX_ERR_FRIEND_ADD_BAD_CHECKSUM   ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_BAD_CHECKSUM
	TOX_ERR_FRIEND_ADD_SET_NEW_NOSPAM ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_SET_NEW_NOSPAM
	TOX_ERR_FRIEND_ADD_MALLOC         ToxErrFriendAdd = C.TOX_ERR_FRIEND_ADD_MALLOC
)

type ToxErrFriendByPublicKey

type ToxErrFriendByPublicKey C.enum_TOX_ERR_FRIEND_BY_PUBLIC_KEY
const (
	TOX_ERR_FRIEND_BY_PUBLIC_KEY_OK        ToxErrFriendByPublicKey = C.TOX_ERR_FRIEND_BY_PUBLIC_KEY_OK
	TOX_ERR_FRIEND_BY_PUBLIC_KEY_NULL      ToxErrFriendByPublicKey = C.TOX_ERR_FRIEND_BY_PUBLIC_KEY_NULL
	TOX_ERR_FRIEND_BY_PUBLIC_KEY_NOT_FOUND ToxErrFriendByPublicKey = C.TOX_ERR_FRIEND_BY_PUBLIC_KEY_NOT_FOUND
)

type ToxErrFriendCustomPacket

type ToxErrFriendCustomPacket C.enum_TOX_ERR_FRIEND_CUSTOM_PACKET
const (
	TOX_ERR_FRIEND_CUSTOM_PACKET_OK                   ToxErrFriendCustomPacket = C.TOX_ERR_FRIEND_CUSTOM_PACKET_OK
	TOX_ERR_FRIEND_CUSTOM_PACKET_NULL                 ToxErrFriendCustomPacket = C.TOX_ERR_FRIEND_CUSTOM_PACKET_NULL
	TOX_ERR_FRIEND_CUSTOM_PACKET_FRIEND_NOT_FOUND     ToxErrFriendCustomPacket = C.TOX_ERR_FRIEND_CUSTOM_PACKET_FRIEND_NOT_FOUND
	TOX_ERR_FRIEND_CUSTOM_PACKET_FRIEND_NOT_CONNECTED ToxErrFriendCustomPacket = C.TOX_ERR_FRIEND_CUSTOM_PACKET_FRIEND_NOT_CONNECTED
	TOX_ERR_FRIEND_CUSTOM_PACKET_INVALID              ToxErrFriendCustomPacket = C.TOX_ERR_FRIEND_CUSTOM_PACKET_INVALID
	TOX_ERR_FRIEND_CUSTOM_PACKET_EMPTY                ToxErrFriendCustomPacket = C.TOX_ERR_FRIEND_CUSTOM_PACKET_EMPTY
	TOX_ERR_FRIEND_CUSTOM_PACKET_TOO_LONG             ToxErrFriendCustomPacket = C.TOX_ERR_FRIEND_CUSTOM_PACKET_TOO_LONG
	TOX_ERR_FRIEND_CUSTOM_PACKET_SENDQ                ToxErrFriendCustomPacket = C.TOX_ERR_FRIEND_CUSTOM_PACKET_SENDQ
)

type ToxErrFriendDelete

type ToxErrFriendDelete C.enum_TOX_ERR_FRIEND_DELETE
const (
	TOX_ERR_FRIEND_DELETE_OK               ToxErrFriendDelete = C.TOX_ERR_FRIEND_DELETE_OK
	TOX_ERR_FRIEND_DELETE_FRIEND_NOT_FOUND ToxErrFriendDelete = C.TOX_ERR_FRIEND_DELETE_FRIEND_NOT_FOUND
)

type ToxErrFriendGetLastOnline

type ToxErrFriendGetLastOnline C.enum_TOX_ERR_FRIEND_GET_LAST_ONLINE
const (
	TOX_ERR_FRIEND_GET_LAST_ONLINE_OK               ToxErrFriendGetLastOnline = C.TOX_ERR_FRIEND_GET_LAST_ONLINE_OK
	TOX_ERR_FRIEND_GET_LAST_ONLINE_FRIEND_NOT_FOUND ToxErrFriendGetLastOnline = C.TOX_ERR_FRIEND_GET_LAST_ONLINE_FRIEND_NOT_FOUND
)

type ToxErrFriendGetPublicKey

type ToxErrFriendGetPublicKey C.enum_TOX_ERR_FRIEND_GET_PUBLIC_KEY
const (
	TOX_ERR_FRIEND_GET_PUBLIC_KEY_OK               ToxErrFriendGetPublicKey = C.TOX_ERR_FRIEND_GET_PUBLIC_KEY_OK
	TOX_ERR_FRIEND_GET_PUBLIC_KEY_FRIEND_NOT_FOUND ToxErrFriendGetPublicKey = C.TOX_ERR_FRIEND_GET_PUBLIC_KEY_FRIEND_NOT_FOUND
)

type ToxErrFriendQuery

type ToxErrFriendQuery C.enum_TOX_ERR_FRIEND_QUERY
const (
	TOX_ERR_FRIEND_QUERY_OK               ToxErrFriendQuery = C.TOX_ERR_FRIEND_QUERY_OK
	TOX_ERR_FRIEND_QUERY_NULL             ToxErrFriendQuery = C.TOX_ERR_FRIEND_QUERY_NULL
	TOX_ERR_FRIEND_QUERY_FRIEND_NOT_FOUND ToxErrFriendQuery = C.TOX_ERR_FRIEND_QUERY_FRIEND_NOT_FOUND
)

type ToxErrFriendSendMessage

type ToxErrFriendSendMessage C.enum_TOX_ERR_FRIEND_SEND_MESSAGE
const (
	TOX_ERR_FRIEND_SEND_MESSAGE_OK                   ToxErrFriendSendMessage = C.TOX_ERR_FRIEND_SEND_MESSAGE_OK
	TOX_ERR_FRIEND_SEND_MESSAGE_NULL                 ToxErrFriendSendMessage = C.TOX_ERR_FRIEND_SEND_MESSAGE_NULL
	TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND     ToxErrFriendSendMessage = C.TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND
	TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_CONNECTED ToxErrFriendSendMessage = C.TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_CONNECTED
	TOX_ERR_FRIEND_SEND_MESSAGE_SENDQ                ToxErrFriendSendMessage = C.TOX_ERR_FRIEND_SEND_MESSAGE_SENDQ
	TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG             ToxErrFriendSendMessage = C.TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG
	TOX_ERR_FRIEND_SEND_MESSAGE_EMPTY                ToxErrFriendSendMessage = C.TOX_ERR_FRIEND_SEND_MESSAGE_EMPTY
)

type ToxErrGetPort

type ToxErrGetPort C.enum_TOX_ERR_GET_PORT
const (
	TOX_ERR_GET_PORT_OK        ToxErrGetPort = C.TOX_ERR_GET_PORT_OK
	TOX_ERR_GET_PORT_NOT_BOUND ToxErrGetPort = C.TOX_ERR_GET_PORT_NOT_BOUND
)

type ToxErrNew

type ToxErrNew C.enum_TOX_ERR_NEW
const (
	TOX_ERR_NEW_OK              ToxErrNew = C.TOX_ERR_NEW_OK
	TOX_ERR_NEW_NULL            ToxErrNew = C.TOX_ERR_NEW_NULL
	TOX_ERR_NEW_MALLOC          ToxErrNew = C.TOX_ERR_NEW_MALLOC
	TOX_ERR_NEW_PORT_ALLOC      ToxErrNew = C.TOX_ERR_NEW_PORT_ALLOC
	TOX_ERR_NEW_PROXY_BAD_TYPE  ToxErrNew = C.TOX_ERR_NEW_PROXY_BAD_TYPE
	TOX_ERR_NEW_PROXY_BAD_HOST  ToxErrNew = C.TOX_ERR_NEW_PROXY_BAD_HOST
	TOX_ERR_NEW_PROXY_BAD_PORT  ToxErrNew = C.TOX_ERR_NEW_PROXY_BAD_PORT
	TOX_ERR_NEW_PROXY_NOT_FOUND ToxErrNew = C.TOX_ERR_NEW_PROXY_NOT_FOUND
	TOX_ERR_NEW_LOAD_ENCRYPTED  ToxErrNew = C.TOX_ERR_NEW_LOAD_ENCRYPTED
	TOX_ERR_NEW_LOAD_BAD_FORMAT ToxErrNew = C.TOX_ERR_NEW_LOAD_BAD_FORMAT
)

type ToxErrOptionsNew

type ToxErrOptionsNew C.enum_TOX_ERR_OPTIONS_NEW
const (
	TOX_ERR_OPTIONS_NEW_OK     ToxErrOptionsNew = C.TOX_ERR_OPTIONS_NEW_OK
	TOX_ERR_OPTIONS_NEW_MALLOC ToxErrOptionsNew = C.TOX_ERR_OPTIONS_NEW_MALLOC
)

type ToxErrSetInfo

type ToxErrSetInfo C.enum_TOX_ERR_SET_INFO
const (
	TOX_ERR_SET_INFO_OK       ToxErrSetInfo = C.TOX_ERR_SET_INFO_OK
	TOX_ERR_SET_INFO_NULL     ToxErrSetInfo = C.TOX_ERR_SET_INFO_NULL
	TOX_ERR_SET_INFO_TOO_LONG ToxErrSetInfo = C.TOX_ERR_SET_INFO_TOO_LONG
)

type ToxErrSetTyping

type ToxErrSetTyping C.enum_TOX_ERR_SET_TYPING
const (
	TOX_ERR_SET_TYPING_OK               ToxErrSetTyping = C.TOX_ERR_SET_TYPING_OK
	TOX_ERR_SET_TYPING_FRIEND_NOT_FOUND ToxErrSetTyping = C.TOX_ERR_SET_TYPING_FRIEND_NOT_FOUND
)

type ToxFileControl

type ToxFileControl C.enum_TOX_FILE_CONTROL
const (
	TOX_FILE_CONTROL_RESUME ToxFileControl = C.TOX_FILE_CONTROL_RESUME
	TOX_FILE_CONTROL_PAUSE  ToxFileControl = C.TOX_FILE_CONTROL_PAUSE
	TOX_FILE_CONTROL_CANCEL ToxFileControl = C.TOX_FILE_CONTROL_CANCEL
)

type ToxFileKind

type ToxFileKind C.enum_TOX_FILE_KIND
const (
	TOX_FILE_KIND_DATA   ToxFileKind = C.TOX_FILE_KIND_DATA
	TOX_FILE_KIND_AVATAR ToxFileKind = C.TOX_FILE_KIND_AVATAR
)

type ToxMessageType

type ToxMessageType C.enum_TOX_MESSAGE_TYPE
const (
	TOX_MESSAGE_TYPE_NORMAL ToxMessageType = C.TOX_MESSAGE_TYPE_NORMAL
	TOX_MESSAGE_TYPE_ACTION ToxMessageType = C.TOX_MESSAGE_TYPE_ACTION
)

type ToxProxyType

type ToxProxyType C.enum_TOX_PROXY_TYPE
const (
	TOX_PROXY_TYPE_NONE   ToxProxyType = C.TOX_PROXY_TYPE_NONE
	TOX_PROXY_TYPE_HTTP   ToxProxyType = C.TOX_PROXY_TYPE_HTTP
	TOX_PROXY_TYPE_SOCKS5 ToxProxyType = C.TOX_PROXY_TYPE_SOCKS5
)

type ToxSaveDataType

type ToxSaveDataType C.enum_TOX_SAVEDATA_TYPE
const (
	TOX_SAVEDATA_TYPE_NONE       ToxSaveDataType = C.TOX_SAVEDATA_TYPE_NONE
	TOX_SAVEDATA_TYPE_TOX_SAVE   ToxSaveDataType = C.TOX_SAVEDATA_TYPE_TOX_SAVE
	TOX_SAVEDATA_TYPE_SECRET_KEY ToxSaveDataType = C.TOX_SAVEDATA_TYPE_SECRET_KEY
)

type ToxUserStatus

type ToxUserStatus C.enum_TOX_USER_STATUS
const (
	TOX_USERSTATUS_NONE ToxUserStatus = C.TOX_USER_STATUS_NONE
	TOX_USERSTATUS_AWAY ToxUserStatus = C.TOX_USER_STATUS_AWAY
	TOX_USERSTATUS_BUSY ToxUserStatus = C.TOX_USER_STATUS_BUSY
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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