예제 #1
0
static dav_error *
dav_propdb_define_namespaces(dav_db *db, dav_xmlns_info *xi)
{
	(void) xi;
	/* XXX JFS : TODO */
	return __dav_new_error(db->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "not yet implemented");
}
예제 #2
0
static dav_error *
dav_propdb_first_name(dav_db *db, dav_prop_name *pname)
{
	(void) pname;
	/* XXX JFS : TODO */
	return __dav_new_error(db->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "not yet implemented");
}
예제 #3
0
static dav_error *
dav_propdb_apply_rollback(dav_db *db, dav_deadprop_rollback *rollback)
{
	(void) rollback;
	/* XXX JFS : TODO */
	return __dav_new_error(db->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "not yet implemented");
}
예제 #4
0
dav_error*
server_create_and_stat_error(dav_rawx_server_conf *conf, apr_pool_t *p, int status, int error_id, const char *desc)
{
	dav_error *error;
	error = __dav_new_error(p, status, error_id, desc);
	server_inc_daverror_stat(conf, error);
	return error;
}
예제 #5
0
static dav_error *
dav_propdb_get_rollback(dav_db *db, const dav_prop_name *name, dav_deadprop_rollback **prollback)
{
	(void) name;
	(void) prollback;
	/* XXX JFS : TODO */
	return __dav_new_error(db->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "not yet implemented");
}
예제 #6
0
static dav_error *
dav_propdb_remove(dav_db *db, const dav_prop_name *name)
{
	(void) db;
	(void) name;
	/* XXX JFS : TODO */
	return __dav_new_error(db->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "not yet implemented");
}
예제 #7
0
static dav_error *
dav_propdb_map_namespaces( dav_db *db, const apr_array_header_t *namespaces, dav_namespace_map **mapping)
{
	(void) db;
	(void) namespaces;
	(void) mapping;
	/* XXX JFS : TODO */
	return __dav_new_error(db->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "not yet implemented");
}
예제 #8
0
static dav_error *
dav_propdb_store(dav_db *db, const dav_prop_name *name, const apr_xml_elem *elem, dav_namespace_map *mapping)
{
	(void) db;
	(void) name;
	(void) elem;
	(void) mapping;
	/* XXX JFS : TODO */
	return __dav_new_error(db->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "not yet implemented");
}
예제 #9
0
static dav_error *
dav_propdb_output_value(dav_db *db, const dav_prop_name *name, dav_xmlns_info *xi, apr_text_header *phdr, int *found)
{
	(void) db;
	(void) name;
	(void) xi;
	(void) phdr;
	/* XXX JFS : TODO */
	*found = 0;
	return __dav_new_error(db->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "not yet implemented");
}
예제 #10
0
static dav_error *
dav_rawx_patch_exec(const dav_resource *resource, const apr_xml_elem *elem, int operation,
		void *context, dav_liveprop_rollback **rollback_ctx)
{
	(void) resource;
	(void) elem;
	(void) operation;
	(void) context;
	(void) rollback_ctx;
	/* XXX JFS : TODO dump the xattr handle in the file */
	return __dav_new_error(resource->info->pool, HTTP_INTERNAL_SERVER_ERROR, 0, "PROPPATCH not yet implemented");
}
예제 #11
0
static dav_error *
dav_rawx_patch_validate(const dav_resource *resource, const apr_xml_elem *elem, int operation,
		void **context, int *defer_to_dead)
{
	const apr_text *cdata;
	const apr_text *f_cdata;
	char value;
	dav_elem_private *priv = elem->priv;

	if (priv->propid != DAV_PROPID_FS_executable) {
		*defer_to_dead = 1;
		return NULL;
	}

	if (operation == DAV_PROP_OP_DELETE) {
		return __dav_new_error(resource->info->pool, HTTP_CONFLICT, 0,
				"The 'executable' property cannot be removed.");
	}

	cdata = elem->first_cdata.first;

	/* ### hmm. this isn't actually looking at all the possible text items */
	f_cdata = elem->first_child == NULL
		? NULL
		: elem->first_child->following_cdata.first;

	/* DBG3("name=%s  cdata=%s  f_cdata=%s",elem->name,cdata ? cdata->text : "[null]",f_cdata ? f_cdata->text : "[null]"); */

	if (cdata == NULL) {
		if (f_cdata == NULL) {
			return __dav_new_error(resource->info->pool, HTTP_CONFLICT, 0,
					"The 'executable' property expects a single "
					"character, valued 'T' or 'F'. There was no "
					"value submitted.");
		}
		cdata = f_cdata;
	}
	else if (f_cdata != NULL)
		goto too_long;

	if (cdata->next != NULL || strlen(cdata->text) != 1)
		goto too_long;

	value = cdata->text[0];
	if (value != 'T' && value != 'F') {
		return __dav_new_error(resource->info->pool, HTTP_CONFLICT, 0,
				"The 'executable' property expects a single "
				"character, valued 'T' or 'F'. The value "
				"submitted is invalid.");
	}

	*context = (void *)((long)(value == 'T'));

	return NULL;

too_long:
	return __dav_new_error(resource->info->pool, HTTP_CONFLICT, 0,
			"The 'executable' property expects a single "
			"character, valued 'T' or 'F'. The value submitted "
			"has too many characters.");

}