1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 int
 saf_describe_relrep(SAF_ParMode pmode,
                     SAF_RelRep *obj,            /* object to describe */
                     char **name,                /* If non-null, on return points to malloc'd name if any */
                     char **url,                 /* If non-null, on return points to malloc'd URL if any */
                     int *id                     /* If non-null, on return points to unique ID */
                     )
 {
     SAF_ENTER(saf_describe_relrep, SAF_PRECONDITION_ERROR);

     SAF_REQUIRE(_saf_valid_pmode(pmode), SAF_LOW_CHK_COST, SAF_PRECONDITION_ERROR,
                 _saf_errmsg("PMODE must be valid"));
     if (!_saf_is_participating_proc(pmode)) SAF_RETURN(-1);
     SAF_REQUIRE(SS_RELREP(obj), SAF_LOW_CHK_COST, SAF_PRECONDITION_ERROR,
                 _saf_errmsg("OBJ must be a valid relation representation handle"));

     _saf_setupReturned_string(name, ss_string_ptr(SS_RELREP_P(obj,name)));
     _saf_setupReturned_string(url, ss_string_ptr(SS_RELREP_P(obj,url)));
     if (id)   *id   = SS_RELREP(obj)->id;

     SAF_LEAVE(SAF_SUCCESS);
 }