| 83 | |
| 84 | == Application functions == |
| 85 | |
| 86 | Each application must define a set of functions, listed below. |
| 87 | These are stored in a file '''project/html/inc/APPNAME.inc''', |
| 88 | where APPNAME is the application's short name. |
| 89 | |
| 90 | {{{ |
| 91 | bool job_show(object $job, object $instance, object $user) |
| 92 | }}} |
| 93 | |
| 94 | Display the given job instance to the given user. |
| 95 | Return true on success. |
| 96 | |
| 97 | A job may consist of a single web page or a sequence of web pages. |
| 98 | In either case the "done" action on the final page must go to the URL |
| 99 | '''bossa_job_finished.php''', passing it a GET argument '''bji''' consisting |
| 100 | of the ID of the job instance. |
| 101 | |
| 102 | {{{ |
| 103 | job_issued(object $job, object $inst, object $user) |
| 104 | }}} |
| 105 | Called when the given instance has timed out. |
| 106 | |
| 107 | {{{ |
| 108 | job_finished(object $job, object $inst, object $user) |
| 109 | }}} |
| 110 | |
| 111 | Called when the given instance has finished. |
| 112 | |
| 113 | {{{ |
| 114 | job_timed_out(object $job, object $inst, object $user) |
| 115 | }}} |
| 116 | |
| 117 | Called when the given instance has timed out. |
| 118 | |
| 119 | {{{ |
| 120 | string job_summary(object $job) |
| 121 | }}} |
| 122 | |
| 123 | Return a short string describing the job, |
| 124 | for use in administrative pages. |
| 125 | For example, this might return an image name hyperlinked to the image. |
| 126 | |
| 127 | {{{ |
| 128 | string instance_summary(object $info) |
| 129 | }}} |
| 130 | |
| 131 | Return a string summarizing the app data for an instance. |
| 132 | |
| 133 | {{{ |
| 134 | string user_summary(object $user) |
| 135 | }}} |
| 136 | |
| 137 | Return a string summarizing the app data for a user. |