mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 01:43:01 +01:00
Merge branch 'iphydf-fix-typedefs'
This commit is contained in:
commit
b799c6a8d7
@ -56,6 +56,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern FriendsList Friends;
|
extern FriendsList Friends;
|
||||||
|
struct CallControl CallControl;
|
||||||
|
|
||||||
#define cbend pthread_exit(NULL)
|
#define cbend pthread_exit(NULL)
|
||||||
|
|
||||||
@ -934,8 +935,8 @@ void init_friend_AV(uint32_t index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes the call structure for a given friend. Called when a friend is deleted from the friends list.
|
* Deletes a call structure from the Calls list. Called when a friend is deleted from the friends list.
|
||||||
* Index must be equivalent to the friend's friendlist index.
|
* Index must be equivalent to the size of the Calls list.
|
||||||
*/
|
*/
|
||||||
void del_friend_AV(uint32_t index)
|
void del_friend_AV(uint32_t index)
|
||||||
{
|
{
|
||||||
|
@ -79,9 +79,9 @@ struct CallControl {
|
|||||||
uint32_t video_bit_rate;
|
uint32_t video_bit_rate;
|
||||||
int32_t video_frame_duration;
|
int32_t video_frame_duration;
|
||||||
|
|
||||||
} CallControl;
|
};
|
||||||
|
|
||||||
struct CallControl CallControl;
|
extern struct CallControl CallControl;
|
||||||
|
|
||||||
/* You will have to pass pointer to first member of 'windows' declared in windows.c */
|
/* You will have to pass pointer to first member of 'windows' declared in windows.c */
|
||||||
ToxAV *init_audio(ToxWindow *self, Tox *tox);
|
ToxAV *init_audio(ToxWindow *self, Tox *tox);
|
||||||
|
@ -108,7 +108,10 @@ static struct DHT_Nodes {
|
|||||||
/* Determine if a node is offline by comparing the age of the nodeslist
|
/* Determine if a node is offline by comparing the age of the nodeslist
|
||||||
* to the last time the node was successfully pinged.
|
* to the last time the node was successfully pinged.
|
||||||
*/
|
*/
|
||||||
#define NODE_IS_OFFLINE(last_scan, last_ping) ((last_ping + NODE_OFFLINE_TIMOUT) <= (last_ping))
|
static bool node_is_offline(unsigned long long int last_ping)
|
||||||
|
{
|
||||||
|
return last_ping + NODE_OFFLINE_TIMOUT <= last_ping;
|
||||||
|
}
|
||||||
|
|
||||||
/* Return true if nodeslist pointed to by fp needs to be updated.
|
/* Return true if nodeslist pointed to by fp needs to be updated.
|
||||||
* This will be the case if the file is empty, has an invalid format,
|
* This will be the case if the file is empty, has an invalid format,
|
||||||
@ -377,7 +380,7 @@ static int extract_node(const char *line, struct Node *node)
|
|||||||
|
|
||||||
long long int last_pinged = extract_val_last_pinged(last_pinged_str + LAST_PING_JSON_KEY_LEN);
|
long long int last_pinged = extract_val_last_pinged(last_pinged_str + LAST_PING_JSON_KEY_LEN);
|
||||||
|
|
||||||
if (last_pinged <= 0 || NODE_IS_OFFLINE(Nodes.last_scan, last_pinged)) {
|
if (last_pinged <= 0 || node_is_offline(last_pinged)) {
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#define MAX_LINE_INFO_QUEUE 1024
|
#define MAX_LINE_INFO_QUEUE 1024
|
||||||
#define MAX_LINE_INFO_MSG_SIZE MAX_STR_SIZE + TOXIC_MAX_NAME_LENGTH + 32 /* needs extra room for log loading */
|
#define MAX_LINE_INFO_MSG_SIZE MAX_STR_SIZE + TOXIC_MAX_NAME_LENGTH + 32 /* needs extra room for log loading */
|
||||||
|
|
||||||
enum {
|
typedef enum {
|
||||||
SYS_MSG,
|
SYS_MSG,
|
||||||
IN_MSG,
|
IN_MSG,
|
||||||
OUT_MSG,
|
OUT_MSG,
|
||||||
|
@ -30,7 +30,7 @@ struct chatlog {
|
|||||||
bool log_on; /* specific to current chat window */
|
bool log_on; /* specific to current chat window */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
typedef enum {
|
||||||
LOG_GROUP,
|
LOG_GROUP,
|
||||||
LOG_PROMPT,
|
LOG_PROMPT,
|
||||||
LOG_CHAT,
|
LOG_CHAT,
|
||||||
|
@ -67,7 +67,7 @@ static PyObject *python_api_get_nick(PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
static PyObject *python_api_get_status(PyObject *self, PyObject *args)
|
static PyObject *python_api_get_status(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
PyObject *ret;
|
PyObject *ret = NULL;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, ""))
|
if (!PyArg_ParseTuple(args, ""))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -88,7 +88,7 @@ struct user_settings {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum settings_values {
|
||||||
AUTOLOG_OFF = 0,
|
AUTOLOG_OFF = 0,
|
||||||
AUTOLOG_ON = 1,
|
AUTOLOG_ON = 1,
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ enum {
|
|||||||
|
|
||||||
MPLEX_OFF = 0,
|
MPLEX_OFF = 0,
|
||||||
MPLEX_ON = 1,
|
MPLEX_ON = 1,
|
||||||
} settings_values;
|
};
|
||||||
|
|
||||||
#define LINE_JOIN "-->"
|
#define LINE_JOIN "-->"
|
||||||
#define LINE_QUIT "<--"
|
#define LINE_QUIT "<--"
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#define CHATBOX_HEIGHT 2
|
#define CHATBOX_HEIGHT 2
|
||||||
|
|
||||||
/* Curses foreground colours (background is black) */
|
/* Curses foreground colours (background is black) */
|
||||||
enum {
|
typedef enum {
|
||||||
WHITE,
|
WHITE,
|
||||||
GREEN,
|
GREEN,
|
||||||
CYAN,
|
CYAN,
|
||||||
|
Loading…
Reference in New Issue
Block a user