.TH "Query Results" 3 "Wed Jan 25 2012" "Version 5.2" "globus rls client" \" -*- nroff -*- .ad l .nh .SH NAME Query Results \- .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBglobus_rls_attribute_object_t\fP" .br .RI "\fI\fBglobus_rls_client_lrc_attr_search()\fP returns a list of these structures which include the object name (LFN or PFN) and attribute value found by the query\&. \fP" .ti -1c .RI "struct \fBglobus_rls_string2_t\fP" .br .RI "\fIString pair result\&. \fP" .ti -1c .RI "struct \fBglobus_rls_string2_bulk_t\fP" .br .RI "\fIString pair result with return code, returned by bulk query operations\&. \fP" .in -1c .SS "Functions" .in +1c .ti -1c .RI "globus_result_t \fBglobus_rls_client_free_list\fP (globus_list_t *list)" .br .in -1c .SH "Detailed Description" .PP List results are returned as globus_list_t's, list datums depend on the type of query (eg \fBglobus_rls_string2_t\fP, \fBglobus_rls_attribute_t\fP, etc)\&. A list result should be freed with \fBglobus_rls_client_free_list()\fP 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 \fBglobus_rls_client_lrc_get_lfn()\fP: .PP .PP .nf 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:%s\n", 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:%s\n", str2->s1, str2->s2); } globus_rls_client_free_list(str2_list); if (offset == -1) break; } .fi .PP .SH "Function Documentation" .PP .SS "globus_result_t \fBglobus_rls_client_free_list\fP (globus_list_t *list)" .PP Free result list returned by one of the query functions\&. \fBParameters:\fP .RS 4 \fIlist\fP List returned by one of the query functions\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP List and contents successfully freed\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for globus rls client from the source code\&.