tox

package module
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: GPL-3.0 Imports: 16 Imported by: 12

README

Build Status GoDoc

go-toxcore

The golang bindings for libtoxcore

Installation

# fetch libtoxcore if necessary
# see https://github.com/TokTok/c-toxcore/blob/master/INSTALL.md
go get github.com/TokTok/go-toxcore-c

Examples

import "github.com/TokTok/go-toxcore-c"

// use custom options
opt := tox.NewToxOptions()
t := tox.NewTox(opt)
av := tox.NewToxAv(t)

// use default options
t := tox.NewTox(nil)
av := tox.NewToxAv(t)

Tests

go test -v -covermode count

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Documentation

Index

Constants

View Source
const (
	PUBLIC_KEY_SIZE           = int(C.TOX_PUBLIC_KEY_SIZE)
	SECRET_KEY_SIZE           = int(C.TOX_SECRET_KEY_SIZE)
	ADDRESS_SIZE              = int(C.TOX_ADDRESS_SIZE)
	MAX_NAME_LENGTH           = int(C.TOX_MAX_NAME_LENGTH)
	MAX_STATUS_MESSAGE_LENGTH = int(C.TOX_MAX_STATUS_MESSAGE_LENGTH)
	MAX_FRIEND_REQUEST_LENGTH = int(C.TOX_MAX_FRIEND_REQUEST_LENGTH)
	MAX_MESSAGE_LENGTH        = int(C.TOX_MAX_MESSAGE_LENGTH)
	MAX_CUSTOM_PACKET_SIZE    = int(C.TOX_MAX_CUSTOM_PACKET_SIZE)
	HASH_LENGTH               = int(C.TOX_HASH_LENGTH)
	FILE_ID_LENGTH            = int(C.TOX_FILE_ID_LENGTH)
	MAX_FILENAME_LENGTH       = int(C.TOX_MAX_FILENAME_LENGTH)
)
View Source
const (
	USER_STATUS_NONE = int(C.TOX_USER_STATUS_NONE)
	USER_STATUS_AWAY = int(C.TOX_USER_STATUS_AWAY)
	USER_STATUS_BUSY = int(C.TOX_USER_STATUS_BUSY)
)
View Source
const (
	CONNECTION_NONE = int(C.TOX_CONNECTION_NONE)
	CONNECTION_TCP  = int(C.TOX_CONNECTION_TCP)
	CONNECTION_UDP  = int(C.TOX_CONNECTION_UDP)
)
View Source
const (
	FILE_CONTROL_RESUME = int(C.TOX_FILE_CONTROL_RESUME)
	FILE_CONTROL_PAUSE  = int(C.TOX_FILE_CONTROL_PAUSE)
	FILE_CONTROL_CANCEL = int(C.TOX_FILE_CONTROL_CANCEL)
)
View Source
const (
	FILE_KIND_DATA   = uint32(C.TOX_FILE_KIND_DATA)
	FILE_KIND_AVATAR = uint32(C.TOX_FILE_KIND_AVATAR)
)
View Source
const (
	CONFERENCE_TYPE_TEXT = uint8(C.TOX_CONFERENCE_TYPE_TEXT)
	CONFERENCE_TYPE_AV   = uint8(C.TOX_CONFERENCE_TYPE_AV)
)
View Source
const (
	FRIEND_CALL_STATE_ERROR       = int(C.TOXAV_FRIEND_CALL_STATE_ERROR)
	FRIEND_CALL_STATE_FINISHED    = int(C.TOXAV_FRIEND_CALL_STATE_FINISHED)
	FRIEND_CALL_STATE_SENDING_A   = int(C.TOXAV_FRIEND_CALL_STATE_SENDING_A)
	FRIEND_CALL_STATE_SENDING_V   = int(C.TOXAV_FRIEND_CALL_STATE_SENDING_V)
	FRIEND_CALL_STATE_ACCEPTING_A = int(C.TOXAV_FRIEND_CALL_STATE_ACCEPTING_A)
	FRIEND_CALL_STATE_ACCEPTING_V = int(C.TOXAV_FRIEND_CALL_STATE_ACCEPTING_V)
)
View Source
const (
	MESSAGE_TYPE_NORMAL = int(C.TOX_MESSAGE_TYPE_NORMAL)
	MESSAGE_TYPE_ACTION = int(C.TOX_MESSAGE_TYPE_ACTION)
)
View Source
const (
	SAVEDATA_TYPE_NONE       = int(C.TOX_SAVEDATA_TYPE_NONE)
	SAVEDATA_TYPE_TOX_SAVE   = int(C.TOX_SAVEDATA_TYPE_TOX_SAVE)
	SAVEDATA_TYPE_SECRET_KEY = int(C.TOX_SAVEDATA_TYPE_SECRET_KEY)
)
View Source
const (
	PROXY_TYPE_NONE   = int(C.TOX_PROXY_TYPE_NONE)
	PROXY_TYPE_HTTP   = int(C.TOX_PROXY_TYPE_HTTP)
	PROXY_TYPE_SOCKS5 = int(C.TOX_PROXY_TYPE_SOCKS5)
)
View Source
const (
	LOG_LEVEL_TRACE   = int(C.TOX_LOG_LEVEL_TRACE)
	LOG_LEVEL_DEBUG   = int(C.TOX_LOG_LEVEL_DEBUG)
	LOG_LEVEL_INFO    = int(C.TOX_LOG_LEVEL_INFO)
	LOG_LEVEL_WARNING = int(C.TOX_LOG_LEVEL_WARNING)
	LOG_LEVEL_ERROR   = int(C.TOX_LOG_LEVEL_ERROR)
)
View Source
const ERR_BOOTSTRAP_BAD_HOST = int(C.TOX_ERR_BOOTSTRAP_BAD_HOST) // 2
View Source
const ERR_BOOTSTRAP_BAD_PORT = int(C.TOX_ERR_BOOTSTRAP_BAD_PORT) // 3
View Source
const ERR_BOOTSTRAP_NULL = int(C.TOX_ERR_BOOTSTRAP_NULL) // 1
View Source
const ERR_BOOTSTRAP_OK = int(C.TOX_ERR_BOOTSTRAP_OK) // 0
View Source
const ERR_CONFERENCE_BY_ID_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_BY_ID_NOT_FOUND) // 2
View Source
const ERR_CONFERENCE_BY_ID_NULL = int(C.TOX_ERR_CONFERENCE_BY_ID_NULL) // 1
View Source
const ERR_CONFERENCE_BY_ID_OK = int(C.TOX_ERR_CONFERENCE_BY_ID_OK) // 0
View Source
const ERR_CONFERENCE_BY_UID_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_BY_UID_NOT_FOUND) // 2
View Source
const ERR_CONFERENCE_BY_UID_NULL = int(C.TOX_ERR_CONFERENCE_BY_UID_NULL) // 1
View Source
const ERR_CONFERENCE_BY_UID_OK = int(C.TOX_ERR_CONFERENCE_BY_UID_OK) // 0
View Source
const ERR_CONFERENCE_DELETE_CONFERENCE_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_DELETE_CONFERENCE_NOT_FOUND) // 1
View Source
const ERR_CONFERENCE_DELETE_OK = int(C.TOX_ERR_CONFERENCE_DELETE_OK) // 0
View Source
const ERR_CONFERENCE_GET_TYPE_CONFERENCE_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_GET_TYPE_CONFERENCE_NOT_FOUND) // 1
View Source
const ERR_CONFERENCE_GET_TYPE_OK = int(C.TOX_ERR_CONFERENCE_GET_TYPE_OK) // 0
View Source
const ERR_CONFERENCE_INVITE_CONFERENCE_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_INVITE_CONFERENCE_NOT_FOUND) // 1
View Source
const ERR_CONFERENCE_INVITE_FAIL_SEND = int(C.TOX_ERR_CONFERENCE_INVITE_FAIL_SEND) // 2
View Source
const ERR_CONFERENCE_INVITE_NO_CONNECTION = int(C.TOX_ERR_CONFERENCE_INVITE_NO_CONNECTION) // 3
View Source
const ERR_CONFERENCE_INVITE_OK = int(C.TOX_ERR_CONFERENCE_INVITE_OK) // 0
View Source
const ERR_CONFERENCE_JOIN_DUPLICATE = int(C.TOX_ERR_CONFERENCE_JOIN_DUPLICATE) // 4
View Source
const ERR_CONFERENCE_JOIN_FAIL_SEND = int(C.TOX_ERR_CONFERENCE_JOIN_FAIL_SEND) // 6
View Source
const ERR_CONFERENCE_JOIN_FRIEND_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_JOIN_FRIEND_NOT_FOUND) // 3
View Source
const ERR_CONFERENCE_JOIN_INIT_FAIL = int(C.TOX_ERR_CONFERENCE_JOIN_INIT_FAIL) // 5
View Source
const ERR_CONFERENCE_JOIN_INVALID_LENGTH = int(C.TOX_ERR_CONFERENCE_JOIN_INVALID_LENGTH) // 1
View Source
const ERR_CONFERENCE_JOIN_OK = int(C.TOX_ERR_CONFERENCE_JOIN_OK) // 0
View Source
const ERR_CONFERENCE_JOIN_WRONG_TYPE = int(C.TOX_ERR_CONFERENCE_JOIN_WRONG_TYPE) // 2
View Source
const ERR_CONFERENCE_NEW_INIT = int(C.TOX_ERR_CONFERENCE_NEW_INIT) // 1
View Source
const ERR_CONFERENCE_NEW_OK = int(C.TOX_ERR_CONFERENCE_NEW_OK) // 0
View Source
const ERR_CONFERENCE_PEER_QUERY_CONFERENCE_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_PEER_QUERY_CONFERENCE_NOT_FOUND) // 1
View Source
const ERR_CONFERENCE_PEER_QUERY_NO_CONNECTION = int(C.TOX_ERR_CONFERENCE_PEER_QUERY_NO_CONNECTION) // 3
View Source
const ERR_CONFERENCE_PEER_QUERY_OK = int(C.TOX_ERR_CONFERENCE_PEER_QUERY_OK) // 0
View Source
const ERR_CONFERENCE_PEER_QUERY_PEER_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_PEER_QUERY_PEER_NOT_FOUND) // 2
View Source
const ERR_CONFERENCE_SEND_MESSAGE_CONFERENCE_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_SEND_MESSAGE_CONFERENCE_NOT_FOUND) // 1
View Source
const ERR_CONFERENCE_SEND_MESSAGE_FAIL_SEND = int(C.TOX_ERR_CONFERENCE_SEND_MESSAGE_FAIL_SEND) // 4
View Source
const ERR_CONFERENCE_SEND_MESSAGE_NO_CONNECTION = int(C.TOX_ERR_CONFERENCE_SEND_MESSAGE_NO_CONNECTION) // 3
View Source
const ERR_CONFERENCE_SEND_MESSAGE_OK = int(C.TOX_ERR_CONFERENCE_SEND_MESSAGE_OK) // 0
View Source
const ERR_CONFERENCE_SEND_MESSAGE_TOO_LONG = int(C.TOX_ERR_CONFERENCE_SEND_MESSAGE_TOO_LONG) // 2
View Source
const ERR_CONFERENCE_TITLE_CONFERENCE_NOT_FOUND = int(C.TOX_ERR_CONFERENCE_TITLE_CONFERENCE_NOT_FOUND) // 1
View Source
const ERR_CONFERENCE_TITLE_FAIL_SEND = int(C.TOX_ERR_CONFERENCE_TITLE_FAIL_SEND) // 3
View Source
const ERR_CONFERENCE_TITLE_INVALID_LENGTH = int(C.TOX_ERR_CONFERENCE_TITLE_INVALID_LENGTH) // 2
View Source
const ERR_CONFERENCE_TITLE_OK = int(C.TOX_ERR_CONFERENCE_TITLE_OK) // 0
View Source
const ERR_FILE_CONTROL_ALREADY_PAUSED = int(C.TOX_ERR_FILE_CONTROL_ALREADY_PAUSED) // 6
View Source
const ERR_FILE_CONTROL_DENIED = int(C.TOX_ERR_FILE_CONTROL_DENIED) // 5
View Source
const ERR_FILE_CONTROL_FRIEND_NOT_CONNECTED = int(C.TOX_ERR_FILE_CONTROL_FRIEND_NOT_CONNECTED) // 2
View Source
const ERR_FILE_CONTROL_FRIEND_NOT_FOUND = int(C.TOX_ERR_FILE_CONTROL_FRIEND_NOT_FOUND) // 1
View Source
const ERR_FILE_CONTROL_NOT_FOUND = int(C.TOX_ERR_FILE_CONTROL_NOT_FOUND) // 3
View Source
const ERR_FILE_CONTROL_NOT_PAUSED = int(C.TOX_ERR_FILE_CONTROL_NOT_PAUSED) // 4
View Source
const ERR_FILE_CONTROL_OK = int(C.TOX_ERR_FILE_CONTROL_OK) // 0
View Source
const ERR_FILE_CONTROL_SENDQ = int(C.TOX_ERR_FILE_CONTROL_SENDQ) // 7
View Source
const ERR_FILE_GET_FRIEND_NOT_FOUND = int(C.TOX_ERR_FILE_GET_FRIEND_NOT_FOUND) // 2
View Source
const ERR_FILE_GET_NOT_FOUND = int(C.TOX_ERR_FILE_GET_NOT_FOUND) // 3
View Source
const ERR_FILE_GET_NULL = int(C.TOX_ERR_FILE_GET_NULL) // 1
View Source
const ERR_FILE_GET_OK = int(C.TOX_ERR_FILE_GET_OK) // 0
View Source
const ERR_FILE_SEEK_DENIED = int(C.TOX_ERR_FILE_SEEK_DENIED) // 4
View Source
const ERR_FILE_SEEK_FRIEND_NOT_CONNECTED = int(C.TOX_ERR_FILE_SEEK_FRIEND_NOT_CONNECTED) // 2
View Source
const ERR_FILE_SEEK_FRIEND_NOT_FOUND = int(C.TOX_ERR_FILE_SEEK_FRIEND_NOT_FOUND) // 1
View Source
const ERR_FILE_SEEK_INVALID_POSITION = int(C.TOX_ERR_FILE_SEEK_INVALID_POSITION) // 5
View Source
const ERR_FILE_SEEK_NOT_FOUND = int(C.TOX_ERR_FILE_SEEK_NOT_FOUND) // 3
View Source
const ERR_FILE_SEEK_OK = int(C.TOX_ERR_FILE_SEEK_OK) // 0
View Source
const ERR_FILE_SEEK_SENDQ = int(C.TOX_ERR_FILE_SEEK_SENDQ) // 6
View Source
const ERR_FILE_SEND_CHUNK_FRIEND_NOT_CONNECTED = int(C.TOX_ERR_FILE_SEND_CHUNK_FRIEND_NOT_CONNECTED) // 3
View Source
const ERR_FILE_SEND_CHUNK_FRIEND_NOT_FOUND = int(C.TOX_ERR_FILE_SEND_CHUNK_FRIEND_NOT_FOUND) // 2
View Source
const ERR_FILE_SEND_CHUNK_INVALID_LENGTH = int(C.TOX_ERR_FILE_SEND_CHUNK_INVALID_LENGTH) // 6
View Source
const ERR_FILE_SEND_CHUNK_NOT_FOUND = int(C.TOX_ERR_FILE_SEND_CHUNK_NOT_FOUND) // 4
View Source
const ERR_FILE_SEND_CHUNK_NOT_TRANSFERRING = int(C.TOX_ERR_FILE_SEND_CHUNK_NOT_TRANSFERRING) // 5
View Source
const ERR_FILE_SEND_CHUNK_NULL = int(C.TOX_ERR_FILE_SEND_CHUNK_NULL) // 1
View Source
const ERR_FILE_SEND_CHUNK_OK = int(C.TOX_ERR_FILE_SEND_CHUNK_OK) // 0
View Source
const ERR_FILE_SEND_CHUNK_SENDQ = int(C.TOX_ERR_FILE_SEND_CHUNK_SENDQ) // 7
View Source
const ERR_FILE_SEND_CHUNK_WRONG_POSITION = int(C.TOX_ERR_FILE_SEND_CHUNK_WRONG_POSITION) // 8
View Source
const ERR_FILE_SEND_FRIEND_NOT_CONNECTED = int(C.TOX_ERR_FILE_SEND_FRIEND_NOT_CONNECTED) // 3
View Source
const ERR_FILE_SEND_FRIEND_NOT_FOUND = int(C.TOX_ERR_FILE_SEND_FRIEND_NOT_FOUND) // 2
View Source
const ERR_FILE_SEND_NAME_TOO_LONG = int(C.TOX_ERR_FILE_SEND_NAME_TOO_LONG) // 4
View Source
const ERR_FILE_SEND_NULL = int(C.TOX_ERR_FILE_SEND_NULL) // 1
View Source
const ERR_FILE_SEND_OK = int(C.TOX_ERR_FILE_SEND_OK) // 0
View Source
const ERR_FILE_SEND_TOO_MANY = int(C.TOX_ERR_FILE_SEND_TOO_MANY) // 5
View Source
const ERR_FRIEND_ADD_ALREADY_SENT = int(C.TOX_ERR_FRIEND_ADD_ALREADY_SENT) // 5
View Source
const ERR_FRIEND_ADD_BAD_CHECKSUM = int(C.TOX_ERR_FRIEND_ADD_BAD_CHECKSUM) // 6
View Source
const ERR_FRIEND_ADD_MALLOC = int(C.TOX_ERR_FRIEND_ADD_MALLOC) // 8
View Source
const ERR_FRIEND_ADD_NO_MESSAGE = int(C.TOX_ERR_FRIEND_ADD_NO_MESSAGE) // 3
View Source
const ERR_FRIEND_ADD_NULL = int(C.TOX_ERR_FRIEND_ADD_NULL) // 1
View Source
const ERR_FRIEND_ADD_OK = int(C.TOX_ERR_FRIEND_ADD_OK) // 0
View Source
const ERR_FRIEND_ADD_OWN_KEY = int(C.TOX_ERR_FRIEND_ADD_OWN_KEY) // 4
View Source
const ERR_FRIEND_ADD_SET_NEW_NOSPAM = int(C.TOX_ERR_FRIEND_ADD_SET_NEW_NOSPAM) // 7
View Source
const ERR_FRIEND_ADD_TOO_LONG = int(C.TOX_ERR_FRIEND_ADD_TOO_LONG) // 2
View Source
const ERR_FRIEND_BY_PUBLIC_KEY_NOT_FOUND = int(C.TOX_ERR_FRIEND_BY_PUBLIC_KEY_NOT_FOUND) // 2
View Source
const ERR_FRIEND_BY_PUBLIC_KEY_NULL = int(C.TOX_ERR_FRIEND_BY_PUBLIC_KEY_NULL) // 1
View Source
const ERR_FRIEND_BY_PUBLIC_KEY_OK = int(C.TOX_ERR_FRIEND_BY_PUBLIC_KEY_OK) // 0
View Source
const ERR_FRIEND_CUSTOM_PACKET_EMPTY = int(C.TOX_ERR_FRIEND_CUSTOM_PACKET_EMPTY) // 5
View Source
const ERR_FRIEND_CUSTOM_PACKET_FRIEND_NOT_CONNECTED = int(C.TOX_ERR_FRIEND_CUSTOM_PACKET_FRIEND_NOT_CONNECTED) // 3
View Source
const ERR_FRIEND_CUSTOM_PACKET_FRIEND_NOT_FOUND = int(C.TOX_ERR_FRIEND_CUSTOM_PACKET_FRIEND_NOT_FOUND) // 2
View Source
const ERR_FRIEND_CUSTOM_PACKET_INVALID = int(C.TOX_ERR_FRIEND_CUSTOM_PACKET_INVALID) // 4
View Source
const ERR_FRIEND_CUSTOM_PACKET_NULL = int(C.TOX_ERR_FRIEND_CUSTOM_PACKET_NULL) // 1
View Source
const ERR_FRIEND_CUSTOM_PACKET_OK = int(C.TOX_ERR_FRIEND_CUSTOM_PACKET_OK) // 0
View Source
const ERR_FRIEND_CUSTOM_PACKET_SENDQ = int(C.TOX_ERR_FRIEND_CUSTOM_PACKET_SENDQ) // 7
View Source
const ERR_FRIEND_CUSTOM_PACKET_TOO_LONG = int(C.TOX_ERR_FRIEND_CUSTOM_PACKET_TOO_LONG) // 6
View Source
const ERR_FRIEND_DELETE_FRIEND_NOT_FOUND = int(C.TOX_ERR_FRIEND_DELETE_FRIEND_NOT_FOUND) // 1
View Source
const ERR_FRIEND_DELETE_OK = int(C.TOX_ERR_FRIEND_DELETE_OK) // 0
View Source
const ERR_FRIEND_GET_LAST_ONLINE_FRIEND_NOT_FOUND = int(C.TOX_ERR_FRIEND_GET_LAST_ONLINE_FRIEND_NOT_FOUND) // 1
View Source
const ERR_FRIEND_GET_LAST_ONLINE_OK = int(C.TOX_ERR_FRIEND_GET_LAST_ONLINE_OK) // 0
View Source
const ERR_FRIEND_GET_PUBLIC_KEY_FRIEND_NOT_FOUND = int(C.TOX_ERR_FRIEND_GET_PUBLIC_KEY_FRIEND_NOT_FOUND) // 1
View Source
const ERR_FRIEND_GET_PUBLIC_KEY_OK = int(C.TOX_ERR_FRIEND_GET_PUBLIC_KEY_OK) // 0
View Source
const ERR_FRIEND_QUERY_FRIEND_NOT_FOUND = int(C.TOX_ERR_FRIEND_QUERY_FRIEND_NOT_FOUND) // 2
View Source
const ERR_FRIEND_QUERY_NULL = int(C.TOX_ERR_FRIEND_QUERY_NULL) // 1
View Source
const ERR_FRIEND_QUERY_OK = int(C.TOX_ERR_FRIEND_QUERY_OK) // 0
View Source
const ERR_FRIEND_SEND_MESSAGE_EMPTY = int(C.TOX_ERR_FRIEND_SEND_MESSAGE_EMPTY) // 6
View Source
const ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_CONNECTED = int(C.TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_CONNECTED) // 3
View Source
const ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND = int(C.TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND) // 2
View Source
const ERR_FRIEND_SEND_MESSAGE_NULL = int(C.TOX_ERR_FRIEND_SEND_MESSAGE_NULL) // 1
View Source
const ERR_FRIEND_SEND_MESSAGE_OK = int(C.TOX_ERR_FRIEND_SEND_MESSAGE_OK) // 0
View Source
const ERR_FRIEND_SEND_MESSAGE_SENDQ = int(C.TOX_ERR_FRIEND_SEND_MESSAGE_SENDQ) // 4
View Source
const ERR_FRIEND_SEND_MESSAGE_TOO_LONG = int(C.TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG) // 5
View Source
const ERR_GET_PORT_NOT_BOUND = int(C.TOX_ERR_GET_PORT_NOT_BOUND) // 1
View Source
const ERR_GET_PORT_OK = int(C.TOX_ERR_GET_PORT_OK) // 0
View Source
const ERR_NEW_LOAD_BAD_FORMAT = int(C.TOX_ERR_NEW_LOAD_BAD_FORMAT) // 9
View Source
const ERR_NEW_LOAD_ENCRYPTED = int(C.TOX_ERR_NEW_LOAD_ENCRYPTED) // 8
View Source
const ERR_NEW_MALLOC = int(C.TOX_ERR_NEW_MALLOC) // 2
View Source
const ERR_NEW_NULL = int(C.TOX_ERR_NEW_NULL) // 1
View Source
const ERR_NEW_OK = int(C.TOX_ERR_NEW_OK) // 0
View Source
const ERR_NEW_PORT_ALLOC = int(C.TOX_ERR_NEW_PORT_ALLOC) // 3
View Source
const ERR_NEW_PROXY_BAD_HOST = int(C.TOX_ERR_NEW_PROXY_BAD_HOST) // 5
View Source
const ERR_NEW_PROXY_BAD_PORT = int(C.TOX_ERR_NEW_PROXY_BAD_PORT) // 6
View Source
const ERR_NEW_PROXY_BAD_TYPE = int(C.TOX_ERR_NEW_PROXY_BAD_TYPE) // 4
View Source
const ERR_NEW_PROXY_NOT_FOUND = int(C.TOX_ERR_NEW_PROXY_NOT_FOUND) // 7
View Source
const ERR_OPTIONS_NEW_MALLOC = int(C.TOX_ERR_OPTIONS_NEW_MALLOC) // 1
View Source
const ERR_OPTIONS_NEW_OK = int(C.TOX_ERR_OPTIONS_NEW_OK) // 0
View Source
const ERR_SET_INFO_NULL = int(C.TOX_ERR_SET_INFO_NULL) // 1
View Source
const ERR_SET_INFO_OK = int(C.TOX_ERR_SET_INFO_OK) // 0
View Source
const ERR_SET_INFO_TOO_LONG = int(C.TOX_ERR_SET_INFO_TOO_LONG) // 2
View Source
const ERR_SET_TYPING_FRIEND_NOT_FOUND = int(C.TOX_ERR_SET_TYPING_FRIEND_NOT_FOUND) // 1
View Source
const ERR_SET_TYPING_OK = int(C.TOX_ERR_SET_TYPING_OK) // 0
View Source
const PASS_ENCRYPTION_EXTRA_LENGTH = int(C.TOX_PASS_ENCRYPTION_EXTRA_LENGTH)
View Source
const PASS_KEY_LENGTH = int(C.TOX_PASS_KEY_LENGTH)

Variables

This section is empty.

Functions

func ConnStatusString

func ConnStatusString(status int) (s string)

func FileExist

func FileExist(fname string) bool

func GetSalt

func GetSalt(ciphertext []byte) (bool, error, []byte)

func IsDataEncrypted

func IsDataEncrypted(data []byte) bool

func KeepPkg

func KeepPkg()

//////////////////

func LoadSavedata

func LoadSavedata(fname string) ([]byte, error)

func PassDecrypt

func PassDecrypt(ciphertext []byte, passphrase []byte) (plaintext []byte, err error)

func PassEncrypt

func PassEncrypt(plaintext []byte, passphrase []byte) (ciphertext []byte, err error)

func SetDebug

func SetDebug(debug bool)

func SetLogLevel

func SetLogLevel(level int)

Types

type BootNode

type BootNode struct {
	Addr   string
	Port   int
	Pubkey string
}

type CallControlType

type CallControlType int

type ConnectionType

type ConnectionType int

type FileControlType

type FileControlType int

type FileKind

type FileKind uint32

type GroupchatType

type GroupchatType int

type MessageType

type MessageType int

type Tox

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

func NewTox

func NewTox(opt *ToxOptions) *Tox

func (*Tox) AddAVGroupChat

func (this *Tox) AddAVGroupChat(cbfn cb_audio_ftype) uint32

func (*Tox) AddGroupChat

func (this *Tox) AddGroupChat() (int, error)

methods

func (*Tox) AddTcpRelay

func (this *Tox) AddTcpRelay(addr string, port uint16, pubkey string) (bool, error)

boostrap, see upper

func (*Tox) Bootstrap

func (this *Tox) Bootstrap(addr string, port uint16, pubkey string) (bool, error)

* @param pubkey hex 64B length

func (*Tox) CallbackConferenceAction

func (this *Tox) CallbackConferenceAction(cbfn cb_conference_action_ftype, userData interface{})

func (*Tox) CallbackConferenceActionAdd

func (this *Tox) CallbackConferenceActionAdd(cbfn cb_conference_action_ftype, userData interface{})

func (*Tox) CallbackConferenceInvite

func (this *Tox) CallbackConferenceInvite(cbfn cb_conference_invite_ftype, userData interface{})

func (*Tox) CallbackConferenceInviteAdd

func (this *Tox) CallbackConferenceInviteAdd(cbfn cb_conference_invite_ftype, userData interface{})

func (*Tox) CallbackConferenceMessage

func (this *Tox) CallbackConferenceMessage(cbfn cb_conference_message_ftype, userData interface{})

func (*Tox) CallbackConferenceMessageAdd

func (this *Tox) CallbackConferenceMessageAdd(cbfn cb_conference_message_ftype, userData interface{})

func (*Tox) CallbackConferencePeerListChanged

func (this *Tox) CallbackConferencePeerListChanged(cbfn cb_conference_peer_list_changed_ftype, userData interface{})

func (*Tox) CallbackConferencePeerListChangedAdd

func (this *Tox) CallbackConferencePeerListChangedAdd(cbfn cb_conference_peer_list_changed_ftype, userData interface{})

func (*Tox) CallbackConferencePeerName

func (this *Tox) CallbackConferencePeerName(cbfn cb_conference_peer_name_ftype, userData interface{})

func (*Tox) CallbackConferencePeerNameAdd

func (this *Tox) CallbackConferencePeerNameAdd(cbfn cb_conference_peer_name_ftype, userData interface{})

func (*Tox) CallbackConferenceTitle

func (this *Tox) CallbackConferenceTitle(cbfn cb_conference_title_ftype, userData interface{})

func (*Tox) CallbackConferenceTitleAdd

func (this *Tox) CallbackConferenceTitleAdd(cbfn cb_conference_title_ftype, userData interface{})

func (*Tox) CallbackFileChunkRequest

func (this *Tox) CallbackFileChunkRequest(cbfn cb_file_chunk_request_ftype, userData interface{})

func (*Tox) CallbackFileChunkRequestAdd

func (this *Tox) CallbackFileChunkRequestAdd(cbfn cb_file_chunk_request_ftype, userData interface{})

func (*Tox) CallbackFileRecv

func (this *Tox) CallbackFileRecv(cbfn cb_file_recv_ftype, userData interface{})

func (*Tox) CallbackFileRecvAdd

func (this *Tox) CallbackFileRecvAdd(cbfn cb_file_recv_ftype, userData interface{})

func (*Tox) CallbackFileRecvChunk

func (this *Tox) CallbackFileRecvChunk(cbfn cb_file_recv_chunk_ftype, userData interface{})

func (*Tox) CallbackFileRecvChunkAdd

func (this *Tox) CallbackFileRecvChunkAdd(cbfn cb_file_recv_chunk_ftype, userData interface{})

func (*Tox) CallbackFileRecvControl

func (this *Tox) CallbackFileRecvControl(cbfn cb_file_recv_control_ftype, userData interface{})

func (*Tox) CallbackFileRecvControlAdd

func (this *Tox) CallbackFileRecvControlAdd(cbfn cb_file_recv_control_ftype, userData interface{})

func (*Tox) CallbackFriendConnectionStatus

func (this *Tox) CallbackFriendConnectionStatus(cbfn cb_friend_connection_status_ftype, userData interface{})

func (*Tox) CallbackFriendConnectionStatusAdd

func (this *Tox) CallbackFriendConnectionStatusAdd(cbfn cb_friend_connection_status_ftype, userData interface{})

func (*Tox) CallbackFriendLosslessPacket

func (this *Tox) CallbackFriendLosslessPacket(cbfn cb_friend_lossless_packet_ftype, userData interface{})

func (*Tox) CallbackFriendLosslessPacketAdd

func (this *Tox) CallbackFriendLosslessPacketAdd(cbfn cb_friend_lossless_packet_ftype, userData interface{})

func (*Tox) CallbackFriendLossyPacket

func (this *Tox) CallbackFriendLossyPacket(cbfn cb_friend_lossy_packet_ftype, userData interface{})

func (*Tox) CallbackFriendLossyPacketAdd

func (this *Tox) CallbackFriendLossyPacketAdd(cbfn cb_friend_lossy_packet_ftype, userData interface{})

func (*Tox) CallbackFriendMessage

func (this *Tox) CallbackFriendMessage(cbfn cb_friend_message_ftype, userData interface{})

func (*Tox) CallbackFriendMessageAdd

func (this *Tox) CallbackFriendMessageAdd(cbfn cb_friend_message_ftype, userData interface{})

func (*Tox) CallbackFriendName

func (this *Tox) CallbackFriendName(cbfn cb_friend_name_ftype, userData interface{})

func (*Tox) CallbackFriendNameAdd

func (this *Tox) CallbackFriendNameAdd(cbfn cb_friend_name_ftype, userData interface{})

func (*Tox) CallbackFriendReadReceipt

func (this *Tox) CallbackFriendReadReceipt(cbfn cb_friend_read_receipt_ftype, userData interface{})

func (*Tox) CallbackFriendReadReceiptAdd

func (this *Tox) CallbackFriendReadReceiptAdd(cbfn cb_friend_read_receipt_ftype, userData interface{})

func (*Tox) CallbackFriendRequest

func (this *Tox) CallbackFriendRequest(cbfn cb_friend_request_ftype, userData interface{})

func (*Tox) CallbackFriendRequestAdd

func (this *Tox) CallbackFriendRequestAdd(cbfn cb_friend_request_ftype, userData interface{})

func (*Tox) CallbackFriendStatus

func (this *Tox) CallbackFriendStatus(cbfn cb_friend_status_ftype, userData interface{})

func (*Tox) CallbackFriendStatusAdd

func (this *Tox) CallbackFriendStatusAdd(cbfn cb_friend_status_ftype, userData interface{})

func (*Tox) CallbackFriendStatusMessage

func (this *Tox) CallbackFriendStatusMessage(cbfn cb_friend_status_message_ftype, userData interface{})

func (*Tox) CallbackFriendStatusMessageAdd

func (this *Tox) CallbackFriendStatusMessageAdd(cbfn cb_friend_status_message_ftype, userData interface{})

func (*Tox) CallbackFriendTyping

func (this *Tox) CallbackFriendTyping(cbfn cb_friend_typing_ftype, userData interface{})

func (*Tox) CallbackFriendTypingAdd

func (this *Tox) CallbackFriendTypingAdd(cbfn cb_friend_typing_ftype, userData interface{})

func (*Tox) CallbackGroupAction

func (this *Tox) CallbackGroupAction(cbfn cb_group_action_ftype, userData interface{})

func (*Tox) CallbackGroupActionAdd

func (this *Tox) CallbackGroupActionAdd(cbfn cb_group_action_ftype, userData interface{})

func (*Tox) CallbackGroupInvite

func (this *Tox) CallbackGroupInvite(cbfn cb_group_invite_ftype, userData interface{})

func (*Tox) CallbackGroupInviteAdd

func (this *Tox) CallbackGroupInviteAdd(cbfn cb_group_invite_ftype, userData interface{})

func (*Tox) CallbackGroupMessage

func (this *Tox) CallbackGroupMessage(cbfn cb_group_message_ftype, userData interface{})

func (*Tox) CallbackGroupMessageAdd

func (this *Tox) CallbackGroupMessageAdd(cbfn cb_group_message_ftype, userData interface{})

func (*Tox) CallbackGroupTitle

func (this *Tox) CallbackGroupTitle(cbfn cb_group_title_ftype, userData interface{})

func (*Tox) CallbackGroupTitleAdd

func (this *Tox) CallbackGroupTitleAdd(cbfn cb_group_title_ftype, userData interface{})

func (*Tox) CallbackSelfConnectionStatus

func (this *Tox) CallbackSelfConnectionStatus(cbfn cb_self_connection_status_ftype, userData interface{})

func (*Tox) CallbackSelfConnectionStatusAdd

func (this *Tox) CallbackSelfConnectionStatusAdd(cbfn cb_self_connection_status_ftype, userData interface{})

func (*Tox) ConferenceDelete

func (this *Tox) ConferenceDelete(groupNumber uint32) (int, error)

func (*Tox) ConferenceGetChatlist

func (this *Tox) ConferenceGetChatlist() []uint32

func (*Tox) ConferenceGetChatlistSize

func (this *Tox) ConferenceGetChatlistSize() uint32

func (*Tox) ConferenceGetIdentifier

func (this *Tox) ConferenceGetIdentifier(groupNumber uint32) (string, error)

func (*Tox) ConferenceGetNames

func (this *Tox) ConferenceGetNames(groupNumber uint32) []string

extra combined api

func (*Tox) ConferenceGetPeerPubkeys

func (this *Tox) ConferenceGetPeerPubkeys(groupNumber uint32) []string

func (*Tox) ConferenceGetPeers

func (this *Tox) ConferenceGetPeers(groupNumber uint32) map[uint32]string

func (*Tox) ConferenceGetPubkey

func (this *Tox) ConferenceGetPubkey(groupNumber uint32) (string, error)

func (*Tox) ConferenceGetTitle

func (this *Tox) ConferenceGetTitle(groupNumber uint32) (string, error)

func (*Tox) ConferenceGetType

func (this *Tox) ConferenceGetType(groupNumber uint32) (int, error)

func (*Tox) ConferenceInvite

func (this *Tox) ConferenceInvite(friendNumber uint32, groupNumber uint32) (int, error)

func (*Tox) ConferenceJoin

func (this *Tox) ConferenceJoin(friendNumber uint32, cookie string) (uint32, error)

func (*Tox) ConferenceNew

func (this *Tox) ConferenceNew() (uint32, error)

methods tox_conference_*

func (*Tox) ConferencePeerCount

func (this *Tox) ConferencePeerCount(groupNumber uint32) uint32

func (*Tox) ConferencePeerGetName

func (this *Tox) ConferencePeerGetName(groupNumber uint32, peerNumber uint32) (string, error)

func (*Tox) ConferencePeerGetPublicKey

func (this *Tox) ConferencePeerGetPublicKey(groupNumber uint32, peerNumber uint32) (string, error)

func (*Tox) ConferencePeerNumberIsOurs

func (this *Tox) ConferencePeerNumberIsOurs(groupNumber uint32, peerNumber uint32) bool

func (*Tox) ConferenceSendMessage

func (this *Tox) ConferenceSendMessage(groupNumber uint32, mtype int, message string) (int, error)

func (*Tox) ConferenceSetTitle

func (this *Tox) ConferenceSetTitle(groupNumber uint32, title string) (int, error)

func (*Tox) CountChatList

func (this *Tox) CountChatList() uint32

func (*Tox) DelGroupChat

func (this *Tox) DelGroupChat(groupNumber int) (int, error)

func (*Tox) FileControl

func (this *Tox) FileControl(friendNumber uint32, fileNumber uint32, control int) (bool, error)

tox_callback_file_***

func (*Tox) FileGetFileId

func (this *Tox) FileGetFileId(friendNumber uint32, fileNumber uint32) (string, error)

func (*Tox) FileSeek

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

func (*Tox) FileSend

func (this *Tox) FileSend(friendNumber uint32, kind uint32, fileSize uint64, fileId string, fileName string) (uint32, error)

func (*Tox) FileSendChunk

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

func (*Tox) FriendAdd

func (this *Tox) FriendAdd(friendId string, message string) (uint32, error)

func (*Tox) FriendAddNorequest

func (this *Tox) FriendAddNorequest(friendId string) (uint32, error)

func (*Tox) FriendByPublicKey

func (this *Tox) FriendByPublicKey(pubkey string) (uint32, error)

func (*Tox) FriendDelete

func (this *Tox) FriendDelete(friendNumber uint32) (bool, error)

func (*Tox) FriendExists

func (this *Tox) FriendExists(friendNumber uint32) bool

func (*Tox) FriendGetConnectionStatus

func (this *Tox) FriendGetConnectionStatus(friendNumber uint32) (int, error)

func (*Tox) FriendGetLastOnline

func (this *Tox) FriendGetLastOnline(friendNumber uint32) (uint64, error)

func (*Tox) FriendGetName

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

func (*Tox) FriendGetNameSize

func (this *Tox) FriendGetNameSize(friendNumber uint32) (int, error)

func (*Tox) FriendGetPublicKey

func (this *Tox) FriendGetPublicKey(friendNumber uint32) (string, error)

func (*Tox) FriendGetStatus

func (this *Tox) FriendGetStatus(friendNumber uint32) (int, error)

func (*Tox) FriendGetStatusMessage

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

func (*Tox) FriendGetStatusMessageSize

func (this *Tox) FriendGetStatusMessageSize(friendNumber uint32) (int, error)

func (*Tox) FriendGetTyping

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

func (*Tox) FriendSendAction

func (this *Tox) FriendSendAction(friendNumber uint32, action string) (uint32, error)

func (*Tox) FriendSendLosslessPacket

func (this *Tox) FriendSendLosslessPacket(friendNumber uint32, data string) error

func (*Tox) FriendSendLossyPacket

func (this *Tox) FriendSendLossyPacket(friendNumber uint32, data string) error

func (*Tox) FriendSendMessage

func (this *Tox) FriendSendMessage(friendNumber uint32, message string) (uint32, error)

func (*Tox) GetChatList

func (this *Tox) GetChatList() []int32

func (*Tox) GetSavedata

func (this *Tox) GetSavedata() []byte

func (*Tox) GetSavedataSize

func (this *Tox) GetSavedataSize() int32

func (*Tox) GroupActionSend

func (this *Tox) GroupActionSend(groupNumber int, action string) (int, error)

func (*Tox) GroupGetNames

func (this *Tox) GroupGetNames(groupNumber int) []string

extra combined api

func (*Tox) GroupGetPeerPubkeys

func (this *Tox) GroupGetPeerPubkeys(groupNumber int) []string

func (*Tox) GroupGetPeers

func (this *Tox) GroupGetPeers(groupNumber int) map[int]string

func (*Tox) GroupGetTitle

func (this *Tox) GroupGetTitle(groupNumber int) (string, error)

func (*Tox) GroupGetType

func (this *Tox) GroupGetType(groupNumber uint32) (int, error)

func (*Tox) GroupMessageSend

func (this *Tox) GroupMessageSend(groupNumber int, message string) (int, error)

func (*Tox) GroupNumberPeers

func (this *Tox) GroupNumberPeers(groupNumber int) int

func (*Tox) GroupPeerName

func (this *Tox) GroupPeerName(groupNumber int, peerNumber int) (string, error)

func (*Tox) GroupPeerNumberIsOurs

func (this *Tox) GroupPeerNumberIsOurs(groupNumber int, peerNumber uint32) bool

func (*Tox) GroupPeerPubkey

func (this *Tox) GroupPeerPubkey(groupNumber int, peerNumber int) (string, error)

func (*Tox) GroupSetTitle

func (this *Tox) GroupSetTitle(groupNumber int, title string) (int, error)

func (*Tox) Hash

func (this *Tox) Hash(data string, datalen uint32) (string, bool, error)

func (*Tox) HookConferenceDelete

func (this *Tox) HookConferenceDelete(fn func(groupNumber uint32))

func (*Tox) HookConferenceJoin

func (this *Tox) HookConferenceJoin(fn func(friendNumber uint32, groupNumber uint32, cookie string))

include av group

func (*Tox) HookConferenceNew

func (this *Tox) HookConferenceNew(fn func(groupNumber uint32))

func (*Tox) HookConferenceSetTitle

func (this *Tox) HookConferenceSetTitle(fn func(groupNumber uint32, title string))

func (*Tox) InviteFriend

func (this *Tox) InviteFriend(friendNumber uint32, groupNumber int) (int, error)

func (*Tox) IsConnected

func (this *Tox) IsConnected() int

func (*Tox) Iterate

func (this *Tox) Iterate()
The main loop that needs to be run in intervals of tox_iteration_interval() ms.

void tox_iterate(Tox *tox); compatable with legacy version

func (*Tox) Iterate2

func (this *Tox) Iterate2(userData interface{})

for toktok new method

func (*Tox) IterationInterval

func (this *Tox) IterationInterval() int

uint32_t tox_iteration_interval(Tox *tox);

func (*Tox) JoinAVGroupChat

func (this *Tox) JoinAVGroupChat(friendNumber uint32, cookie string, cbfn cb_audio_ftype) (uint32, error)

func (*Tox) JoinGroupChat

func (this *Tox) JoinGroupChat(friendNumber uint32, cookie string) (int, error)

func (*Tox) Kill

func (this *Tox) Kill()

func (*Tox) LoadSavedata

func (this *Tox) LoadSavedata(fname string) ([]byte, error)

func (*Tox) SelfGetAddress

func (this *Tox) SelfGetAddress() string

func (*Tox) SelfGetConnectionStatus

func (this *Tox) SelfGetConnectionStatus() int

func (*Tox) SelfGetDhtId added in v0.2.17

func (this *Tox) SelfGetDhtId() string

func (*Tox) SelfGetFriendList

func (this *Tox) SelfGetFriendList() []uint32

func (*Tox) SelfGetFriendListSize

func (this *Tox) SelfGetFriendListSize() uint32

func (*Tox) SelfGetName

func (this *Tox) SelfGetName() string

func (*Tox) SelfGetNameSize

func (this *Tox) SelfGetNameSize() int

func (*Tox) SelfGetNospam

func (this *Tox) SelfGetNospam() uint32

func (*Tox) SelfGetPublicKey

func (this *Tox) SelfGetPublicKey() string

func (*Tox) SelfGetSecretKey

func (this *Tox) SelfGetSecretKey() string

func (*Tox) SelfGetStatus

func (this *Tox) SelfGetStatus() int

func (*Tox) SelfGetStatusMessage

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

func (*Tox) SelfGetStatusMessageSize

func (this *Tox) SelfGetStatusMessageSize() int

func (*Tox) SelfGetUdpPort added in v0.2.17

func (this *Tox) SelfGetUdpPort() (uint16, error)

func (*Tox) SelfSetName

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

func (*Tox) SelfSetNospam

func (this *Tox) SelfSetNospam(nospam uint32)

func (*Tox) SelfSetStatus

func (this *Tox) SelfSetStatus(status uint8)

func (*Tox) SelfSetStatusMessage

func (this *Tox) SelfSetStatusMessage(status string) (bool, error)

func (*Tox) SelfSetTyping

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

func (*Tox) WriteSavedata

func (this *Tox) WriteSavedata(fname string) error

the go-toxcore-c has data lost problem we need first write tmp file, and if ok, then mv to real file

type ToxAV

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

func NewToxAV

func NewToxAV(tox *Tox) (*ToxAV, error)

func (*ToxAV) Answer

func (this *ToxAV) Answer(friendNumber uint32, audioBitRate uint32, videoBitRate uint32) (bool, error)

func (*ToxAV) AudioSendFrame

func (this *ToxAV) AudioSendFrame(friendNumber uint32, pcm []byte, sampleCount int, channels int, samplingRate int) (bool, error)

func (*ToxAV) AudioSetBitRate

func (this *ToxAV) AudioSetBitRate(friendNumber uint32, audioBitRate uint32) (bool, error)

func (*ToxAV) Call

func (this *ToxAV) Call(friendNumber uint32, audioBitRate uint32, videoBitRate uint32) (bool, error)

func (*ToxAV) CallControl

func (this *ToxAV) CallControl(friendNumber uint32, control int) (bool, error)

func (*ToxAV) CallbackAudioBitRate

func (this *ToxAV) CallbackAudioBitRate(cbfn cb_audio_bit_rate_ftype, userData interface{})

func (*ToxAV) CallbackAudioReceiveFrame

func (this *ToxAV) CallbackAudioReceiveFrame(cbfn cb_audio_receive_frame_ftype, userData interface{})

func (*ToxAV) CallbackCall

func (this *ToxAV) CallbackCall(cbfn cb_call_ftype, userData interface{})

func (*ToxAV) CallbackCallState

func (this *ToxAV) CallbackCallState(cbfn cb_call_state_ftype, userData interface{})

func (*ToxAV) CallbackVideoBitRate

func (this *ToxAV) CallbackVideoBitRate(cbfn cb_video_bit_rate_ftype, userData interface{})

func (*ToxAV) CallbackVideoReceiveFrame

func (this *ToxAV) CallbackVideoReceiveFrame(cbfn cb_video_receive_frame_ftype, userData interface{})

func (*ToxAV) GetTox

func (this *ToxAV) GetTox() *Tox

func (*ToxAV) Iterate

func (this *ToxAV) Iterate()

func (*ToxAV) IterationInterval

func (this *ToxAV) IterationInterval() int

func (*ToxAV) Kill

func (this *ToxAV) Kill()

func (*ToxAV) VideoSendFrame

func (this *ToxAV) VideoSendFrame(friendNumber uint32, width uint16, height uint16, data []byte) (bool, error)

func (*ToxAV) VideoSetBitRate

func (this *ToxAV) VideoSetBitRate(friendNumber uint32, videoBitRate uint32) (bool, error)

type ToxOptions

type ToxOptions struct {
	Ipv6_enabled            bool
	Udp_enabled             bool
	Proxy_type              int32
	Proxy_host              string
	Proxy_port              uint16
	Savedata_type           int
	Savedata_data           []byte
	Tcp_port                uint16
	Local_discovery_enabled bool
	Start_port              uint16
	End_port                uint16
	Hole_punching_enabled   bool
	ThreadSafe              bool
	LogCallback             func(_ *Tox, level int, file string, line uint32, fname string, msg string)
}

func NewToxOptions

func NewToxOptions() *ToxOptions

type ToxPassKey

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

func Derive

func Derive(passphrase []byte) (*ToxPassKey, error)

func DeriveWithSalt

func DeriveWithSalt(passphrase []byte, salt []byte) (*ToxPassKey, error)

func (*ToxPassKey) Decrypt

func (this *ToxPassKey) Decrypt(ciphertext []byte) (bool, error, []byte)

func (*ToxPassKey) Encrypt

func (this *ToxPassKey) Encrypt(plaintext []byte) (bool, error, []byte)

func (*ToxPassKey) Free

func (this *ToxPassKey) Free()

type UserStatus

type UserStatus int

Directories

Path Synopsis
cmds

Jump to

Keyboard shortcuts

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