Provided by: libglobus-rls-client-doc_5.2-11_all bug

NAME

       Query Results -

   Data Structures
       struct globus_rls_attribute_object_t
       struct globus_rls_string2_t
       struct globus_rls_string2_bulk_t

   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;
       }

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.

       References GLOBUS_RLS_BADARG.

Author

       Generated automatically by Doxygen for globus rls client from the source code.