/*
read directory content
*/
-int rgw_readdir(const struct rgw_file_handle *parent_handle, const char *path);
+typedef bool (*rgw_readdir_cb)(const char *name, void *arg, uint64_t cookie);
+
+int rgw_readdir(const struct rgw_file_handle *parent_handle, uint64_t offset,
+ rgw_readdir_cb cb, void *cb_arg, int *eof);
int rgw_set_attributes(const struct rgw_file_handle *handle);
/*
read directory content
*/
-int rgw_readdir(const struct rgw_file_handle* parent_handle, const char* path)
+int rgw_readdir(const struct rgw_file_handle *parent_handle, uint64_t offset,
+ rgw_readdir_cb rcb, void *cb_arg, int *eof)
{
string uri;
int rc;
return rc;
}
-#if 0
+#if 0 /* TODO: implement */
if (is_root(uri)) {
/* get the bucket list */
return librgw.get_user_buckets_list();
}
#endif
+ /* XXXX */
+ (void) rcb("test1", cb_arg, 1);
+ (void) rcb("test2", cb_arg, 2);
+ (void) rcb("test3", cb_arg, 3);
+
+ *eof = true;
+
return 0;
}