mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Add some core doc comments, remove dead code
This commit is contained in:
parent
cb81200582
commit
7b3c2bd1e8
|
@ -51,7 +51,6 @@ Core::Core(Camera* cam, QThread *coreThread, QString loadPath) :
|
||||||
qDebug() << "Core: loading Tox from" << loadPath;
|
qDebug() << "Core: loading Tox from" << loadPath;
|
||||||
|
|
||||||
videobuf = new uint8_t[videobufsize];
|
videobuf = new uint8_t[videobufsize];
|
||||||
videoBusyness=0;
|
|
||||||
|
|
||||||
for (int i = 0; i < ptCounter; i++)
|
for (int i = 0; i < ptCounter; i++)
|
||||||
pwsaltedkeys[i] = nullptr;
|
pwsaltedkeys[i] = nullptr;
|
||||||
|
|
38
src/core.h
38
src/core.h
|
@ -45,36 +45,33 @@ public:
|
||||||
static const QString CONFIG_FILE_NAME;
|
static const QString CONFIG_FILE_NAME;
|
||||||
static QString sanitize(QString name);
|
static QString sanitize(QString name);
|
||||||
|
|
||||||
int getGroupNumberPeers(int groupId) const;
|
int getGroupNumberPeers(int groupId) const; ///< Return the number of peers in the group chat on success, or -1 on failure
|
||||||
QString getGroupPeerName(int groupId, int peerId) const;
|
QString getGroupPeerName(int groupId, int peerId) const; ///< Get the name of a peer of a group
|
||||||
QList<QString> getGroupPeerNames(int groupId) const;
|
QList<QString> getGroupPeerNames(int groupId) const; ///< Get the names of the peers of a group
|
||||||
QString getFriendAddress(int friendNumber) const;
|
QString getFriendAddress(int friendNumber) const; ///< Get the full address if known, or Tox ID of a friend
|
||||||
QString getFriendUsername(int friendNumber) const;
|
QString getFriendUsername(int friendNumber) const; ///< Get the username of a friend
|
||||||
int joinGroupchat(int32_t friendnumber, const uint8_t* friend_group_public_key,uint16_t length) const;
|
int joinGroupchat(int32_t friendNumber, const uint8_t* pubkey,uint16_t length) const; ///< Accept a groupchat invite
|
||||||
void quitGroupChat(int groupId) const;
|
void quitGroupChat(int groupId) const; ///< Quit a groupchat
|
||||||
void dispatchVideoFrame(vpx_image img) const;
|
|
||||||
|
|
||||||
void saveConfiguration();
|
void saveConfiguration();
|
||||||
void saveConfiguration(const QString& path);
|
void saveConfiguration(const QString& path);
|
||||||
|
|
||||||
QString getIDString();
|
QString getIDString(); ///< Get the 12 first characters of our Tox ID
|
||||||
|
|
||||||
QString getUsername();
|
QString getUsername(); ///< Returns our username, or an empty string on failure
|
||||||
QString getStatusMessage();
|
QString getStatusMessage(); ///< Returns our status message, or an empty string on failure
|
||||||
ToxID getSelfId();
|
ToxID getSelfId(); ///< Returns our Tox ID
|
||||||
|
|
||||||
VideoSource* getVideoSourceFromCall(int callNumber);
|
VideoSource* getVideoSourceFromCall(int callNumber); ///< Get a call's video source
|
||||||
void increaseVideoBusyness();
|
|
||||||
void decreaseVideoBusyness();
|
|
||||||
|
|
||||||
bool anyActiveCalls();
|
bool anyActiveCalls(); ///< true is any calls are currently active (note: a call about to start is not yet active)
|
||||||
bool isPasswordSet(PasswordType passtype);
|
bool isPasswordSet(PasswordType passtype);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void start();
|
void start(); ///< Initializes the core, must be called before anything else
|
||||||
void process();
|
void process(); ///< Processes toxcore events and ensure we stay connected, called by its own timer
|
||||||
void bootstrapDht();
|
void bootstrapDht(); ///< Connects us to the Tox network
|
||||||
void switchConfiguration(const QString& profile);
|
void switchConfiguration(const QString& profile); ///< Load a different profile and restart the core
|
||||||
|
|
||||||
void acceptFriendRequest(const QString& userId);
|
void acceptFriendRequest(const QString& userId);
|
||||||
void requestFriendship(const QString& friendAddress, const QString& message);
|
void requestFriendship(const QString& friendAddress, const QString& message);
|
||||||
|
@ -260,7 +257,6 @@ private:
|
||||||
|
|
||||||
static const int videobufsize;
|
static const int videobufsize;
|
||||||
static uint8_t* videobuf;
|
static uint8_t* videobuf;
|
||||||
static int videoBusyness; // Used to know when to drop frames
|
|
||||||
|
|
||||||
static ALCdevice* alOutDev, *alInDev;
|
static ALCdevice* alOutDev, *alInDev;
|
||||||
static ALCcontext* alContext;
|
static ALCcontext* alContext;
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
ToxCall Core::calls[TOXAV_MAX_CALLS];
|
ToxCall Core::calls[TOXAV_MAX_CALLS];
|
||||||
const int Core::videobufsize{TOXAV_MAX_VIDEO_WIDTH * TOXAV_MAX_VIDEO_HEIGHT * 4};
|
const int Core::videobufsize{TOXAV_MAX_VIDEO_WIDTH * TOXAV_MAX_VIDEO_HEIGHT * 4};
|
||||||
uint8_t* Core::videobuf;
|
uint8_t* Core::videobuf;
|
||||||
int Core::videoBusyness;
|
|
||||||
|
|
||||||
ALCdevice* Core::alOutDev, *Core::alInDev;
|
ALCdevice* Core::alOutDev, *Core::alInDev;
|
||||||
ALCcontext* Core::alContext;
|
ALCcontext* Core::alContext;
|
||||||
|
@ -292,17 +291,6 @@ void Core::sendCallVideo(int callId)
|
||||||
calls[callId].sendVideoTimer->start();
|
calls[callId].sendVideoTimer->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Core::increaseVideoBusyness()
|
|
||||||
{
|
|
||||||
videoBusyness++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Core::decreaseVideoBusyness()
|
|
||||||
{
|
|
||||||
videoBusyness--;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Core::micMuteToggle(int callId)
|
void Core::micMuteToggle(int callId)
|
||||||
{
|
{
|
||||||
if (calls[callId].active) {
|
if (calls[callId].active) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user