rqbit/crates/librqbit/webui/src/context.tsx

46 lines
1.3 KiB
TypeScript
Raw Normal View History

import { createContext } from "react";
2024-08-21 13:22:22 +01:00
import { RqbitAPI, SessionStats } from "./api-types";
export const APIContext = createContext<RqbitAPI>({
listTorrents: () => {
throw new Error("Function not implemented.");
},
getTorrentDetails: () => {
throw new Error("Function not implemented.");
},
getTorrentStats: () => {
throw new Error("Function not implemented.");
},
uploadTorrent: () => {
throw new Error("Function not implemented.");
},
updateOnlyFiles: () => {
throw new Error("Function not implemented.");
},
pause: () => {
throw new Error("Function not implemented.");
},
start: () => {
throw new Error("Function not implemented.");
},
forget: () => {
throw new Error("Function not implemented.");
},
delete: () => {
throw new Error("Function not implemented.");
},
2024-04-24 22:55:56 +01:00
getTorrentStreamUrl: () => {
throw new Error("Function not implemented.");
},
2024-04-29 18:40:02 +01:00
getStreamLogsUrl: function (): string | null {
throw new Error("Function not implemented.");
},
2024-08-15 15:00:12 +01:00
getPlaylistUrl: function (index: number): string | null {
throw new Error("Function not implemented.");
},
2024-08-21 13:22:22 +01:00
stats: function (): Promise<SessionStats> {
throw new Error("Function not implemented.");
},
});
export const RefreshTorrentStatsContext = createContext({ refresh: () => {} });