# HG changeset patch # User Binki # Date 2009-05-23 21:16:17 # Node ID 60d3bb17d7d30733012644b0a4b33f825db54579 # Parent 3b998819751e43b49e715872f877769e05c54dc5 fixed distren_submit_file declaration, added sample calls to libdistren diff --git a/src/client/distren.c b/src/client/distren.c --- a/src/client/distren.c +++ b/src/client/distren.c @@ -44,9 +44,13 @@ int main(int argc, char *argv[]) { char *input; char *output; + char *jobid; char curopt; + distren_t distren; + distren_job_t distren_job; + struct options_common *options; cfg_t *cfg; @@ -118,6 +122,16 @@ int main(int argc, char *argv[]) fprintf(stderr, "reading from %s\nwriting to %s\n", input, output); + distren_init_mf(&distren, &malloc, &free); + + distren_submit_file(distren, &distren_job, input); + + distren_job_getid(distren_job, &jobid); + fprintf(stdout, "jobid: %s\n", jobid); + + distren_job_free(distren_job); + + distren_free(distren); // Please find a better way of doing this :( you can't strcat multiple strings.. meh diff --git a/src/client/distren.h b/src/client/distren.h --- a/src/client/distren.h +++ b/src/client/distren.h @@ -48,9 +48,9 @@ int distren_init(distren_t *handle); /** Submits a file to distren. @param job must not refer to a valid job. - TODO: create a stream-based interface + @TODO create a stream-based interface */ -int distren_submit_file(distren_job_t *job, const char *filename); +int distren_submit_file(distren_t handle, distren_job_t *job, const char *filename); /** Retrieve a job-ID that can be used to refer to the job after the client's process has recycled. Currently, this will be the only way to retrieve a job handle (a distren_job_t) and, consequently, the only way to retrieve a finished render.