-/** @brief Get details of a scheduled event
- * @param c Client
- * @param id Event ID
- * @param actiondatap Where to put details
- * @return 0 on success, non-0 on error
- */
-int disorder_schedule_get(disorder_client *c, const char *id,
- struct kvp **actiondatap) {
- char **lines, **bits;
- int rc, nbits;
-
- *actiondatap = 0;
- if((rc = disorder_simple_list(c, &lines, NULL,
- "schedule-get", id, (char *)0)))
- return rc;
- while(*lines) {
- if(!(bits = split(*lines++, &nbits, SPLIT_QUOTES, 0, 0))) {
- disorder_error(0, "invalid schedule-get reply: cannot split line");
- return -1;
- }
- if(nbits != 2) {
- disorder_error(0, "invalid schedule-get reply: wrong number of fields");
- return -1;
- }
- kvp_set(actiondatap, bits[0], bits[1]);
- }
- return 0;
-}
-