pnotify namespace
This commit is contained in:
parent
7c19e8f919
commit
36fb8d3f52
|
|
@ -54,7 +54,7 @@
|
|||
#include "pfsxattr.h"
|
||||
#include "plibs.h"
|
||||
#include "pnetlibs.h"
|
||||
#include "pnotifications.h"
|
||||
#include "pnotify.h"
|
||||
#include "ppathstatus.h"
|
||||
#include "prun.h"
|
||||
#include "psettings.h"
|
||||
|
|
@ -2547,8 +2547,8 @@ static int setup_exeptions() {
|
|||
}
|
||||
|
||||
static int send_diff_command(psock_t *sock, subscribed_ids ids) {
|
||||
if (psync_notifications_running()) {
|
||||
const char *ts = psync_notifications_get_thumb_size();
|
||||
if (pnotify_running()) {
|
||||
const char *ts = pnotify_get_thumb_size();
|
||||
if (ts) {
|
||||
if (psync_is_business) {
|
||||
binparam diffparams[] = {
|
||||
|
|
@ -3031,7 +3031,7 @@ restart:
|
|||
!strcmp(entries->str, "notifications")) {
|
||||
ids.notificationid =
|
||||
papi_find_result2(res, "notificationid", PARAM_NUM)->num;
|
||||
psync_notifications_notify(res);
|
||||
pnotify_notify(res);
|
||||
should_free_res = 0; // Don't free res in this case
|
||||
} else if (entries->length == 8 && !strcmp(entries->str, "publinks")) {
|
||||
ids.publinkid = papi_find_result2(res, "publinkid", PARAM_NUM)->num;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
DAMAGE.
|
||||
*/
|
||||
|
||||
#include "pnotifications.h"
|
||||
#include "pnotify.h"
|
||||
#include "plibs.h"
|
||||
#include "pnetlibs.h"
|
||||
#include "psettings.h"
|
||||
|
|
@ -53,11 +53,11 @@ static int ntf_processing = 0;
|
|||
static binresult *ntf_result = NULL;
|
||||
static binresult *ntf_processed_result = NULL;
|
||||
|
||||
int psync_notifications_running() { return ntf_thread_running; }
|
||||
int pnotify_running() { return ntf_thread_running; }
|
||||
|
||||
const char *psync_notifications_get_thumb_size() { return ntf_thumb_size; }
|
||||
const char *pnotify_get_thumb_size() { return ntf_thumb_size; }
|
||||
|
||||
void psync_notifications_notify(binresult *res) {
|
||||
void pnotify_notify(binresult *res) {
|
||||
pthread_mutex_lock(&ntf_mutex);
|
||||
if (ntf_result)
|
||||
psync_free(ntf_result);
|
||||
|
|
@ -181,7 +181,7 @@ static void psync_notifications_thread() {
|
|||
psync_free(thumbpath);
|
||||
}
|
||||
|
||||
void psync_notifications_set_callback(
|
||||
void pnotify_set_callback(
|
||||
pnotification_callback_t notification_callback, const char *thumbsize) {
|
||||
char *ts;
|
||||
pthread_mutex_lock(&ntf_mutex);
|
||||
|
|
@ -284,7 +284,7 @@ static void psync_notification_remove_from_list(psync_tree **tree,
|
|||
}
|
||||
}
|
||||
|
||||
psync_notification_list_t *psync_notifications_get() {
|
||||
psync_notification_list_t *pnotify_get() {
|
||||
psync_list_builder_t *builder;
|
||||
psync_notification_list_t *res;
|
||||
const binresult *ntf_res, *notifications, *ntf, *br;
|
||||
|
|
@ -376,7 +376,7 @@ static void psync_notifications_del_thumb(void *ptr, ppath_stat *st) {
|
|||
pfile_delete(st->path);
|
||||
}
|
||||
|
||||
void psync_notifications_clean() {
|
||||
void pnotify_clean() {
|
||||
char *thumbpath;
|
||||
pthread_mutex_lock(&ntf_mutex);
|
||||
thumbpath = ppath_private(PSYNC_DEFAULT_NTF_THUMB_DIR);
|
||||
|
|
@ -35,12 +35,12 @@
|
|||
#include "papi.h"
|
||||
#include "psynclib.h"
|
||||
|
||||
int psync_notifications_running();
|
||||
const char *psync_notifications_get_thumb_size();
|
||||
void psync_notifications_notify(binresult *res);
|
||||
void psync_notifications_set_callback(
|
||||
int pnotify_running();
|
||||
const char *pnotify_get_thumb_size();
|
||||
void pnotify_notify(binresult *res);
|
||||
void pnotify_set_callback(
|
||||
pnotification_callback_t notification_callback, const char *thumbsize);
|
||||
psync_notification_list_t *psync_notifications_get();
|
||||
void psync_notifications_clean();
|
||||
psync_notification_list_t *pnotify_get();
|
||||
void pnotify_clean();
|
||||
|
||||
#endif
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
#include "plocalscan.h"
|
||||
#include "pmemlock.h"
|
||||
#include "pnetlibs.h"
|
||||
#include "pnotifications.h"
|
||||
#include "pnotify.h"
|
||||
#include "poverlay.h"
|
||||
#include "pp2p.h"
|
||||
#include "ppagecache.h"
|
||||
|
|
@ -343,11 +343,11 @@ void psync_start_sync(pstatus_change_callback_t status_callback,
|
|||
|
||||
void psync_set_notification_callback(
|
||||
pnotification_callback_t notification_callback, const char *thumbsize) {
|
||||
psync_notifications_set_callback(notification_callback, thumbsize);
|
||||
pnotify_set_callback(notification_callback, thumbsize);
|
||||
}
|
||||
|
||||
psync_notification_list_t *psync_get_notifications() {
|
||||
return psync_notifications_get();
|
||||
return pnotify_get();
|
||||
}
|
||||
|
||||
uint32_t psync_download_state() { return 0; }
|
||||
|
|
@ -599,7 +599,7 @@ void psync_unlink() {
|
|||
psync_sql_checkpoint_unlock();
|
||||
psync_settings_reset();
|
||||
pcache_clean();
|
||||
psync_notifications_clean();
|
||||
pnotify_clean();
|
||||
psync_pagecache_reopen_read_cache();
|
||||
pdiff_unlock();
|
||||
pstatus_set(PSTATUS_TYPE_ONLINE, PSTATUS_ONLINE_CONNECTING);
|
||||
|
|
|
|||
Loading…
Reference in New Issue