xxmutils

package
v4.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: BSD-2-Clause, BSD-2-Clause Imports: 16 Imported by: 0

README

= XX Messenger Utility Functions

xxDK users should not use these functions. These functions are used by the mobile phone apps and are not intended to be part of the xxDK. They should be treated as internal functions specific to the phone apps.

These functions are subject to change without notice.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupContact

func LookupContact(userID *id.ID, user *xxdk.E2e, udContact contact.Contact) (
	*contact.Contact, error)

LookupContact lookups up a contact using the user discovery manager xxDK users should not use this function. This function is used by the mobile phone apps and are not intended to be part of the xxDK. It should be treated as internal functions specific to the phone apps.

func LookupContacts

func LookupContacts(in chan *id.ID, out chan *contact.Contact,
	failCh chan failure, user *xxdk.E2e, udContact contact.Contact,
	wg *sync.WaitGroup)

LookupContacts routine looks up contacts xxDK users should not use this function. This function is used by the mobile phone apps and are not intended to be part of the xxDK. It should be treated as internal functions specific to the phone apps.

func ResetSessions

func ResetSessions(in, out chan *contact.Contact, failCh chan failure,
	user *xxdk.E2e, wg *sync.WaitGroup)

ResetSessions routine reads the in channel, sends a reset session request, then marks it done by sending to the out channel. xxDK users should not use this function. This function is used by the mobile phone apps and are not intended to be part of the xxDK. It should be treated as internal functions specific to the phone apps.

func RestoreContactsFromBackup

func RestoreContactsFromBackup(backupPartnerIDs []byte, user *xxdk.E2e,
	udManager *ud.Manager,
	updatesCb RestoreContactsUpdater) ([]*id.ID, []*id.ID,
	[]error, error)

RestoreContactsFromBackup takes as input the jason output of the `NewClientFromBackup` function, unmarshals it into IDs, looks up each ID in user discovery, and initiates a session reset request. This function will not return until every id in the list has been sent a request. It should be called again and again until it completes. xxDK users should not use this function. This function is used by the mobile phone apps and are not intended to be part of the xxDK. It should be treated as internal functions specific to the phone apps.

Types

type RestoreContactsUpdater added in v4.7.1

type RestoreContactsUpdater interface {
	// RestoreContactsCallback is called to report the current # of contacts
	// that have been found and how many have been restored
	// against the total number that need to be
	// processed. If an error occurs it it set on the err variable as a
	// plain string.
	RestoreContactsCallback(numFound, numRestored, total int, err string)
}

RestoreContactsUpdater interface provides a callback function for receiving update information from RestoreContactsFromBackup.

Jump to

Keyboard shortcuts

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