7 #include <libsmbclient.h>
9 #include "get_auth_data_fn.h"
11 static int notify_cb(const struct smbc_notify_callback_action *actions,
12 size_t num_actions, void *private_data)
14 int *count = private_data;
17 printf("%zu\n", num_actions);
19 for (i=0; i<num_actions; i++) {
20 const struct smbc_notify_callback_action *a = &actions[i];
21 printf("%s: %"PRIu32"\n", a->filename, a->action);
32 int main(int argc, char * argv[])
42 smbc_init(get_auth_data_fn, debug);
44 fprintf(stdout, "Path: ");
46 fgets(path, sizeof(path) - 1, stdin);
47 if (strlen(path) == 0) {
51 p = path + strlen(path) - 1;
56 fd = smbc_opendir(path);
62 ret = smbc_notify(fd, 1,
63 SMBC_NOTIFY_CHANGE_SECURITY|
64 SMBC_NOTIFY_CHANGE_FILE_NAME,
65 1000, notify_cb, &count);