qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
Go to the documentation of this file.
39 class QCommandLineParser;
48 const QCommandLineParser* parser);
50 const QCommandLineParser* parser);
74 bool rename(QString newName);
80 static QString
getDbPath(
const QString& profileName);
104 void onAvatarOfferReceived(uint32_t friendId, uint32_t fileId,
const QByteArray& avatarHash, uint64_t filesize);
std::unique_ptr< Core > core
std::shared_ptr< RawDatabase > database
void initCore(const QByteArray &toxsave, Settings &s, bool isNewProfile)
std::unique_ptr< ToxEncrypt > passkey
Handles all qTox internal paths.
bool rename(QString newName)
Tries to rename the profile.
static QStringList profiles
const ToxEncrypt * getPasskey() const
void removeFriendAvatar(const ToxPk &owner)
Removes friend avatar.
void onRequestSent(const ToxPk &friendPk, const QString &message)
Adds history message about friendship request attempt if history is enabled.
bool saveToxSave(QByteArray data)
Write the .tox save, encrypted if needed.
QPixmap loadAvatar()
Get our avatar from cache.
QString setPassword(const QString &newPassword)
Changes the encryption password and re-saves everything with it.
QString avatarPath(const ToxPk &owner, bool forceUnencrypted=false)
Gets the path of the avatar file cached by this profile and corresponding to this owner ID.
std::unique_ptr< BootstrapNodeUpdater > bootstrapNodes
std::unique_ptr< AvatarBroadcaster > avatarBroadcaster
void saveAvatar(const ToxPk &owner, const QByteArray &avatar)
Save an avatar to cache.
bool isRemoved
True if the profile has been removed by remove().
QStringList remove()
Removes the profile permanently. Updates the profiles vector.
void setFriendAvatar(const ToxPk &owner, QByteArray pic)
Sets a friends avatar.
void onAvatarOfferReceived(uint32_t friendId, uint32_t fileId, const QByteArray &avatarHash, uint64_t filesize)
void removeSelfAvatar()
Removes our own avatar.
static bool exists(QString name)
void loadDatabase(QString password)
void friendAvatarRemoved(const ToxPk &friendPk)
This class represents a Tox Public Key, which is a part of Tox ID.
static QString getDbPath(const QString &profileName)
Retrieves the path to the database file for a given profile.
void removeAvatar(const ToxPk &owner)
Removes a cached avatar.
void friendAvatarChanged(const ToxPk &friendPk, const QPixmap &pixmap)
QByteArray loadAvatarData(const ToxPk &owner)
Get a contact's avatar from cache.
Encapsulates the toxencrypsave API. Since key derivation is work intensive and to avoid storing plain...
QByteArray getAvatarHash(const ToxPk &owner)
Get the tox hash of a cached avatar.
History * getHistory()
Get chat history.
Interacts with the profile database to save the chat history.
void coreChanged(Core &core)
std::unique_ptr< CoreAV > coreAv
static Profile * loadProfile(const QString &name, const QString &password, Settings &settings, const QCommandLineParser *parser)
Locks and loads an existing profile and creates the associate Core* instance.
std::shared_ptr< History > history
void onSaveToxSave()
Saves the profile's .tox save, encrypted if needed.
static const QStringList getAllProfileNames()
Scan for profile, automatically importing them if needed.
static QStringList getFilesByExt(QString extension)
Lists all the files in the config dir with a given extension.
static Profile * createProfile(const QString &name, const QString &password, Settings &settings, const QCommandLineParser *parser)
Creates a new profile and the associated Core* instance.
void setAvatar(QByteArray pic)
Sets our own avatar.
bool isEncrypted() const
Checks, if profile has a password.
void selfAvatarChanged(const QPixmap &pixmap)
void friendAvatarSet(const ToxPk &friendPk, const QPixmap &pixmap)
Profile(const QString &name, std::unique_ptr< ToxEncrypt > passkey, Paths &paths, Settings &settings_)
bool isHistoryEnabled()
Checks that the history is enabled in the settings, and loaded successfully for this profile.
void startCore()
Starts the Core thread.