Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

globus_rls_client_queryresult(3) [debian man page]

Query Results(3)						 globus rls client						  Query Results(3)

NAME
Query Results - Data Structures struct globus_rls_attribute_object_t globus_rls_client_lrc_attr_search() returns a list of these structures which include the object name (LFN or PFN) and attribute value found by the query. struct globus_rls_string2_t String pair result. struct globus_rls_string2_bulk_t String pair result with return code, returned by bulk query operations. Functions globus_result_t globus_rls_client_free_list (globus_list_t *list) Detailed Description List results are returned as globus_list_t's, list datums depend on the type of query (eg globus_rls_string2_t, globus_rls_attribute_t, etc). A list result should be freed with globus_rls_client_free_list() when it's no longer needed. RLS supports limiting the number of results returned by a single query using an offset and reslimit. The offset specifies which result to begin with, reslimit specifies how many results to return. Offset should begin at 0 to retrieve all records. If reslimit is 0 then all results are returned at once, unless the server has a limit on results configured. If NULL is passed as the offset argument then the API will repeatedly call the query function until are results are retrieved. The following are equivalent examples of how to print the lfn,pfn pairs returned by globus_rls_client_lrc_get_lfn(): globus_list_t *str2_list; globus_list_t *p; globus_rls_string2_t *str2; // Retrieve all results, API will handle looping through partial results // if the server has a limit configured. Error handling has been omitted. globus_rls_client_lrc_get_lfn(h, "somepfn", NULL, 0, &str2_list); for (p = str2_list; p; p = globus_list_rest(p)) { str2 = (globus_rls_string2_t *) globus_list_first(p); printf("lfn: %s pfn:%s0, str2->s1, str2->s2); } globus_rls_client_free_list(str2_list); // This code fragment retrieves results 5 at a time. Note offset is set // to -1 when the server has no more results to return. int offset = 0; while (globus_rls_client_lrc_get_lfn(h, "somepfn", &offset, 5, &str2_list) == GLOBUS_SUCCESS) { for (p = str2_list; p; p = globus_list_rest(p)) { str2 = (globus_rls_string2_t *) globus_list_first(p); printf("lfn: %s pfn:%s0, str2->s1, str2->s2); } globus_rls_client_free_list(str2_list); if (offset == -1) break; } .fi Function Documentation globus_result_t globus_rls_client_free_list (globus_list_t *list) Free result list returned by one of the query functions. Parameters: list List returned by one of the query functions. Return values: GLOBUS_SUCCESS List and contents successfully freed. Author Generated automatically by Doxygen for globus rls client from the source code. Version 5.2 Wed Jan 25 2012 Query Results(3)

Check Out this Related Man Page

Miscellaneous(3)						 globus rls client						  Miscellaneous(3)

NAME
Miscellaneous - Data Structures struct globus_rls_attribute_t Object (LFN or PFN) attribute type. struct globus_rls_stats_t Various configuration options and statistics about an RLS server returned in the following structures by globus_rls_client_stats(). Defines #define RLS_LRCSERVER 0x1 #define RLS_RLISERVER 0x2 #define RLS_RCVLFNLIST 0x4 #define RLS_RCVBLOOMFILTER 0x8 #define RLS_SNDLFNLIST 0x10 #define RLS_SNDBLOOMFILTER 0x20 #define RLS_INITIALIZED 0x40 Enumerations enum globus_rls_pattern_t { rls_pattern_unix, rls_pattern_sql } enum globus_rls_attr_type_t { globus_rls_attr_type_date, globus_rls_attr_type_flt, globus_rls_attr_type_int, globus_rls_attr_type_str } enum globus_rls_obj_type_t { globus_rls_obj_lrc_lfn, globus_rls_obj_lrc_pfn, globus_rls_obj_rli_lfn, globus_rls_obj_rli_lrc } enum globus_rls_attr_op_t { globus_rls_attr_op_all, globus_rls_attr_op_eq, globus_rls_attr_op_ne, globus_rls_attr_op_gt, globus_rls_attr_op_ge, globus_rls_attr_op_lt, globus_rls_attr_op_le, globus_rls_attr_op_btw, globus_rls_attr_op_like } enum globus_rls_admin_cmd_t { globus_rls_admin_cmd_ping, globus_rls_admin_cmd_quit, globus_rls_admin_cmd_ssu } Functions globus_result_t globus_rls_client_admin (globus_rls_handle_t *h, globus_rls_admin_cmd_t cmd) globus_result_t globus_rls_client_get_configuration (globus_rls_handle_t *h, char *option, globus_list_t **conf_list) globus_result_t globus_rls_client_set_configuration (globus_rls_handle_t *h, char *option, char *value) globus_result_t globus_rls_client_stats (globus_rls_handle_t *h, globus_rls_stats_t *rlsstats) char * globus_rls_client_attr2s (globus_rls_attribute_t *attr, char *buf, int buflen) globus_result_t globus_rls_client_s2attr (globus_rls_attr_type_t type, char *sval, globus_rls_attribute_t *attr) globus_result_t globus_rls_client_error_info (globus_result_t r, int *rc, char *buf, int buflen, globus_bool_t preserve) int globus_list_len (globus_list_t *len) char * globus_rls_errmsg (int rc, char *specificmsg, char *buf, int buflen) Detailed Description Miscellaneous functions and types. Define Documentation #define RLS_LRCSERVER 0x1 Server is LRC server. #define RLS_RLISERVER 0x2 Server is RLI server. #define RLS_RCVLFNLIST 0x4 RLI accepts LFN list updates. #define RLS_RCVBLOOMFILTER 0x8 RLI accepts Bloom filter updates. #define RLS_SNDLFNLIST 0x10 LRC sends LFN list updates. #define RLS_SNDBLOOMFILTER 0x20 LRC sends Bloom filter updates. #define RLS_INITIALIZED 0x40 RLC is fully initialized. Enumeration Type Documentation enum globus_rls_pattern_t Wildcard character style. Enumerator: rls_pattern_unix Unix file globbing chars (*, ?) rls_pattern_sql SQL 'like' wildcards (%, _) enum globus_rls_attr_type_t Attribute Value Types. Enumerator: globus_rls_attr_type_date Date (time_t). globus_rls_attr_type_flt Floating point (double). globus_rls_attr_type_int Integer (int). globus_rls_attr_type_str String (char *). enum globus_rls_obj_type_t Object types in LRC and RLI databases. Enumerator: globus_rls_obj_lrc_lfn LRC Logical File Name. globus_rls_obj_lrc_pfn LRC Physical File Name. globus_rls_obj_rli_lfn RLI Logical File Name. globus_rls_obj_rli_lrc RLI LRC URL. enum globus_rls_attr_op_t Attribute Value Query Operators. Enumerator: globus_rls_attr_op_all All values returned. globus_rls_attr_op_eq Values matching operand 1 returned. globus_rls_attr_op_ne Values not matching operand 1. globus_rls_attr_op_gt Values greater than operand 1. globus_rls_attr_op_ge Values greater than or equal to op1. globus_rls_attr_op_lt Values less than operand 1. globus_rls_attr_op_le Values less than or equal to op1. globus_rls_attr_op_btw Values between operand1 and 2. globus_rls_attr_op_like Strings 'like' operand1 (SQL like) enum globus_rls_admin_cmd_t globus_rls_client_admin() commands. Enumerator: globus_rls_admin_cmd_ping Verify RLS server responding. globus_rls_admin_cmd_quit Tell RLS server to exit. globus_rls_admin_cmd_ssu Tell LRC server to do softstate update. Function Documentation globus_result_t globus_rls_client_admin (globus_rls_handle_t *h, globus_rls_admin_cmd_tcmd) Miscellaneous administrative operations. Most operations require the admin privilege. Parameters: h Handle connected to RLS server. cmd Command to be sent to RLS server. Return values: GLOBUS_SUCCESS Command succeeded. globus_result_t globus_rls_client_get_configuration (globus_rls_handle_t *h, char *option, globus_list_t **conf_list) Get server configuration. Client needs admin privilege. Parameters: h Handle connected to RLS server. option Configuration option to get. If NULL all options are retrieved. Return values: conf_list List of configuration options. GLOBUS_SUCCESS List of retrieved config options returned in conf_list, each datum is of type globus_rls_string2_t. conf_list should be freed with globus_rls_client_free_list(). There may be multiple 'acl' entries in the list, since the access control list can include more than one entry. Each acl configuration value is consists of a regular expression (matched against grid-mapfile users or DNs), a colon, and space separated list of permissions the matching users are granted. globus_result_t globus_rls_client_set_configuration (globus_rls_handle_t *h, char *option, char *value) Set server configuration option. Client needs admin privilege. Parameters: h Handle connected to RLS server. option Configuration option to set. value New value for option. Return values: GLOBUS_SUCCESS Option set on server. globus_result_t globus_rls_client_stats (globus_rls_handle_t *h, globus_rls_stats_t *rlsstats) Retrieve various statistics from RLS server. Requires stats privilege. Parameters: h Handle connected to RLS server. rlsstats Stats returned here. Return values: GLOBUS_SUCCESS Stats returned in rlsstats. char* globus_rls_client_attr2s (globus_rls_attribute_t *attr, char *buf, intbuflen) Map attribute value to string. Parameters: attr Attribute to convert. If attr->type is globus_rls_attr_type_date then the resulting string will be in the format MySQL uses by default, which is YYYYMMDDHHMMSS. buf Buffer to write string value to. Note if attr->type is globus_rls_attr_type_str then attr->val.s is returned, and buf is unused. buflen Size of buf in bytes. Return values: String Value Attribute value converted to a string. globus_result_t globus_rls_client_s2attr (globus_rls_attr_type_ttype, char *sval, globus_rls_attribute_t *attr) Set globus_rls_attribute_t type and val fields from a type and string value. Parameters: type Attribute value type. sval String value to convert to binary. If type is globus_rls_attr_type_date sval should be in the form YYYY-MM-DD HH:MM:SS. attr Attribute whose type and val fields are to be set. Return values: GLOBUS_SUCCESS attr->type and attr->val successfully set. globus_result_t globus_rls_client_error_info (globus_result_tr, int *rc, char *buf, intbuflen, globus_bool_tpreserve) Get error code and message from globus_result_t returned by this API. Parameters: r Result returned by RLS API function. r is freed by this call and should not be referenced again. If preserve is set then a new globus_result_t is constructed with the same values and returned as the function value. rc Address to store error code at. If NULL error code is not returned. buf Address to store error message at. If NULL error message is not returned. preserve If GLOBUS_TRUE then a new globus_result_t is contructed with the same values as the old and returned as the function value. buflen Size of buf. Return values: globus_result_t If preserve is set a new globus_result_t identical to r is returned, otherwise GLOBUS_SUCCESS. int globus_list_len (globus_list_t *len) Compute length of list. globus_list_size() is implemented using recursion, besides being inefficient it can run out of stack space when the list is large. char* globus_rls_errmsg (intrc, char *specificmsg, char *buf, intbuflen) Map RLS status code to error string. Parameters: rc Status code. specificmsg If not NULL prepended (with a colon) to error string. buf Buffer to write error message to. buflen Length of buf. Message will be truncated to fit if too long. Return values: char * Returns buf, error message written to buf. Author Generated automatically by Doxygen for globus rls client from the source code. Version 5.2 Wed Jan 25 2012 Miscellaneous(3)
Man Page