-bool my_python_set_prog(JCR *jcr, const char *prog)
-{
- PyObject *events = (PyObject *)jcr->Python_events;
- BFILE *bfd = &jcr->ff->bfd;
- char method[MAX_NAME_LENGTH];
-
- if (!events) {
- return false;
- }
- bstrncpy(method, prog, sizeof(method));
- bstrncat(method, "_", sizeof(method));
- bstrncat(method, "open", sizeof(method));
- bfd->pio.fo = find_method(events, bfd->pio.fo, method);
- bstrncpy(method, prog, sizeof(method));
- bstrncat(method, "_", sizeof(method));
- bstrncat(method, "read", sizeof(method));
- bfd->pio.fr = find_method(events, bfd->pio.fr, method);
- bstrncpy(method, prog, sizeof(method));
- bstrncat(method, "_", sizeof(method));
- bstrncat(method, "close", sizeof(method));
- bfd->pio.fc = find_method(events, bfd->pio.fc, method);
- return bfd->pio.fo && bfd->pio.fr && bfd->pio.fc;
-}
-
-int my_python_open(BFILE *bfd, const char *fname, int flags, mode_t mode)
-{
- return -1;
-}
-
-int my_python_close(BFILE *bfd)
-{
- return 0;
-}
-
-ssize_t my_python_read(BFILE *bfd, void *buf, size_t count)
-{
- return -1;
-}
-