Documentation ¶
Index ¶
- Constants
- Variables
- func VersionIsCompatible(major uint32, minor uint32, patch uint32) bool
- func VersionMajor() uint32
- func VersionMinor() uint32
- func VersionPatch() uint32
- type OnFileChunkRequest
- type OnFileRecv
- type OnFileRecvChunk
- type OnFileRecvControl
- type OnFriendConnectionStatusChanges
- type OnFriendLosslessPacket
- type OnFriendLossyPacket
- type OnFriendMessage
- type OnFriendNameChanges
- type OnFriendReadReceipt
- type OnFriendRequest
- type OnFriendStatusChanges
- type OnFriendStatusMessageChanges
- type OnFriendTypingChanges
- type OnSelfConnectionStatusChanges
- type Options
- type Tox
- func (t *Tox) AddTCPRelay(address string, port uint16, publickey []byte) error
- func (t *Tox) Bootstrap(address string, port uint16, publickey []byte) error
- func (t *Tox) CallbackFileChunkRequest(f OnFileChunkRequest)
- func (t *Tox) CallbackFileRecv(f OnFileRecv)
- func (t *Tox) CallbackFileRecvChunk(f OnFileRecvChunk)
- func (t *Tox) CallbackFileRecvControl(f OnFileRecvControl)
- func (t *Tox) CallbackFriendConnectionStatusChanges(f OnFriendConnectionStatusChanges)
- func (t *Tox) CallbackFriendLosslessPacket(f OnFriendLosslessPacket)
- func (t *Tox) CallbackFriendLossyPacket(f OnFriendLossyPacket)
- func (t *Tox) CallbackFriendMessage(f OnFriendMessage)
- func (t *Tox) CallbackFriendNameChanges(f OnFriendNameChanges)
- func (t *Tox) CallbackFriendReadReceipt(f OnFriendReadReceipt)
- func (t *Tox) CallbackFriendRequest(f OnFriendRequest)
- func (t *Tox) CallbackFriendStatusChanges(f OnFriendStatusChanges)
- func (t *Tox) CallbackFriendStatusMessageChanges(f OnFriendStatusMessageChanges)
- func (t *Tox) CallbackFriendTypingChanges(f OnFriendTypingChanges)
- func (t *Tox) CallbackSelfConnectionStatusChanges(f OnSelfConnectionStatusChanges)
- func (t *Tox) FileControl(friendNumber uint32, fileNumber uint32, fileControl ToxFileControl) error
- func (t *Tox) FileGetFileId(friendNumber uint32, fileNumber uint32) ([]byte, error)
- func (t *Tox) FileSeek(friendNumber uint32, fileNumber uint32, position uint64) error
- func (t *Tox) FileSend(friendNumber uint32, fileKind ToxFileKind, fileLength uint64, fileID []byte, ...) (uint32, error)
- func (t *Tox) FileSendChunk(friendNumber uint32, fileNumber uint32, position uint64, data []byte) error
- func (t *Tox) FriendAdd(address []byte, message string) (uint32, error)
- func (t *Tox) FriendAddNorequest(publickey []byte) (uint32, error)
- func (t *Tox) FriendByPublicKey(publickey []byte) (uint32, error)
- func (t *Tox) FriendDelete(friendNumber uint32) error
- func (t *Tox) FriendExists(friendNumber uint32) (bool, error)
- func (t *Tox) FriendGetConnectionStatus(friendNumber uint32) (ToxConnection, error)
- func (t *Tox) FriendGetLastOnline(friendNumber uint32) (time.Time, error)
- func (t *Tox) FriendGetName(friendNumber uint32) (string, error)
- func (t *Tox) FriendGetNameSize(friendNumber uint32) (int64, error)
- func (t *Tox) FriendGetPublickey(friendNumber uint32) ([]byte, error)
- func (t *Tox) FriendGetStatus(friendNumber uint32) (ToxUserStatus, error)
- func (t *Tox) FriendGetStatusMessage(friendNumber uint32) (string, error)
- func (t *Tox) FriendGetStatusMessageSize(friendNumber uint32) (int64, error)
- func (t *Tox) FriendGetTyping(friendNumber uint32) (bool, error)
- func (t *Tox) FriendSendLosslessPacket(friendNumber uint32, data []byte) error
- func (t *Tox) FriendSendLossyPacket(friendNumber uint32, data []byte) error
- func (t *Tox) FriendSendMessage(friendNumber uint32, messagetype ToxMessageType, message string) (uint32, error)
- func (t *Tox) GetSaveDataSize() (uint32, error)
- func (t *Tox) GetSavedata() ([]byte, error)
- func (t *Tox) Hash(data []byte) ([]byte, error)
- func (t *Tox) Iterate() error
- func (t *Tox) IterationInterval() (uint32, error)
- func (t *Tox) Kill() error
- func (t *Tox) SelfGetAddress() ([]byte, error)
- func (t *Tox) SelfGetConnectionStatus() (ToxConnection, error)
- func (t *Tox) SelfGetDhtId() ([]byte, error)
- func (t *Tox) SelfGetFriendlist() ([]uint32, error)
- func (t *Tox) SelfGetFriendlistSize() (int64, error)
- func (t *Tox) SelfGetName() (string, error)
- func (t *Tox) SelfGetNameSize() (int64, error)
- func (t *Tox) SelfGetNospam() (uint32, error)
- func (t *Tox) SelfGetPublicKey() ([]byte, error)
- func (t *Tox) SelfGetSecretKey() ([]byte, error)
- func (t *Tox) SelfGetStatus() (ToxUserStatus, error)
- func (t *Tox) SelfGetStatusMessage() (string, error)
- func (t *Tox) SelfGetStatusMessageSize() (int64, error)
- func (t *Tox) SelfGetTCPPort() (uint16, error)
- func (t *Tox) SelfGetUDPPort() (uint16, error)
- func (t *Tox) SelfSetName(name string) error
- func (t *Tox) SelfSetNospam(nospam uint32) error
- func (t *Tox) SelfSetStatus(userstatus ToxUserStatus) error
- func (t *Tox) SelfSetStatusMessage(status string) error
- func (t *Tox) SelfSetTyping(friendNumber uint32, typing bool) error
- type ToxConnection
- type ToxErrBootstrap
- type ToxErrFileControl
- type ToxErrFileGet
- type ToxErrFileSeek
- type ToxErrFileSend
- type ToxErrFileSendChunk
- type ToxErrFriendAdd
- type ToxErrFriendByPublicKey
- type ToxErrFriendCustomPacket
- type ToxErrFriendDelete
- type ToxErrFriendGetLastOnline
- type ToxErrFriendGetPublicKey
- type ToxErrFriendQuery
- type ToxErrFriendSendMessage
- type ToxErrGetPort
- type ToxErrNew
- type ToxErrOptionsNew
- type ToxErrSetInfo
- type ToxErrSetTyping
- type ToxFileControl
- type ToxFileKind
- type ToxMessageType
- type ToxProxyType
- type ToxSaveDataType
- type ToxUserStatus
Constants ¶
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 ¶
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
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") )
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") )
var (
ErrFileSendInvalidFileID = errors.New("The size of the given FileID is invalid.")
)
Functions ¶
func VersionIsCompatible ¶
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 ¶
This event is triggered when a lossless packet is received from a friend.
type OnFriendLossyPacket ¶
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 ¶
This event is triggered when a friend changes their name.
type OnFriendReadReceipt ¶
This event is triggered when the friend receives the message with the * corresponding message ID.
type OnFriendRequest ¶
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 ¶
This event is triggered when a friend changes their status message.
type OnFriendTypingChanges ¶
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 ¶
New creates and initialises a new Tox instance and returns the corresponding * gotox instance.
func (*Tox) AddTCPRelay ¶
AddTCPRelay adds the given node with IP, port, and public key without using * it as a boostrap node.
func (*Tox) Bootstrap ¶
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 ¶
FileGetFileId returns the file id associated to the file transfer.
func (*Tox) FileSeek ¶
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 ¶
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 ¶
FriendAddNorequest adds a friend without sending a friend request. * Returns the friend number on success.
func (*Tox) FriendByPublicKey ¶
FriendByPublicKey returns the friend number associated to a given publickey.
func (*Tox) FriendDelete ¶
FriendDelete removes a friend.
func (*Tox) FriendExists ¶
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 ¶
FriendGetLastOnline returns the timestamp of the last time the friend with * the given friendNumber was seen online.
func (*Tox) FriendGetName ¶
FriendGetName returns the name of friendNumber.
func (*Tox) FriendGetNameSize ¶
FriendGetNameSize returns the length of the name of friendNumber.
func (*Tox) FriendGetPublickey ¶
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 ¶
FriendGetStatusMessage returns the status message of friend with the given * friendNumber.
func (*Tox) FriendGetStatusMessageSize ¶
FriendGetStatusMessageSize returns the size of the status of a friend with * the given friendNumber.
func (*Tox) FriendGetTyping ¶
FriendGetTyping returns true if friendNumber is typing.
func (*Tox) FriendSendLosslessPacket ¶
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 ¶
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 ¶
GetSaveDataSize returns the size of the savedata returned by GetSavedata.
func (*Tox) GetSavedata ¶
GetSavedata returns a byte slice of all information associated with the tox * instance.
func (*Tox) Hash ¶
Hash generates a cryptographic hash of the given data (can be used to cache * avatars).
func (*Tox) Iterate ¶
Iterate is the main loop. It needs to be called every IterationInterval() * milliseconds.
func (*Tox) IterationInterval ¶
IterationInterval returns the time in milliseconds before Iterate() should be * called again.
func (*Tox) Kill ¶
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 ¶
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 ¶
SelfGetDhtId returns the temporary DHT public key of this instance.
func (*Tox) SelfGetFriendlist ¶
SelfGetFriendlist returns a slice of uint32 containing the friendNumbers.
func (*Tox) SelfGetFriendlistSize ¶
SelfGetFriendlistSize returns the number of friends on the friendlist.
func (*Tox) SelfGetName ¶
SelfGetName returns your nickname.
func (*Tox) SelfGetNameSize ¶
SelfGetNameSize returns the length of your name.
func (*Tox) SelfGetNospam ¶
SelfGetNospam returns the nospam of your ID.
func (*Tox) SelfGetPublicKey ¶
SelfGetPublicKey returns the publickey of your profile.
func (*Tox) SelfGetSecretKey ¶
SelfGetSecretKey returns the secretkey of your profile.
func (*Tox) SelfGetStatus ¶
func (t *Tox) SelfGetStatus() (ToxUserStatus, error)
SelfGetStatus returns your status.
func (*Tox) SelfGetStatusMessage ¶
SelfGetStatusMessage returns your status message.
func (*Tox) SelfGetStatusMessageSize ¶
SelfGetStatusMessageSize returns the size of your status message.
func (*Tox) SelfGetTCPPort ¶
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 ¶
SelfGetUDPPort returns the UDP port the Tox instance is bound to.
func (*Tox) SelfSetName ¶
SelfSetName sets your nickname. The maximum name length is MAX_NAME_LENGTH.
func (*Tox) SelfSetNospam ¶
SelfSetNospam sets the nospam of your ID.
func (*Tox) SelfSetStatus ¶
func (t *Tox) SelfSetStatus(userstatus ToxUserStatus) error
SelfSetStatus sets your userstatus.
func (*Tox) SelfSetStatusMessage ¶
SelfSetStatusMessage sets your status message. * The maximum status length is MAX_STATUS_MESSAGE_LENGTH.
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 )