]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/NexuizDemoRecorder/main/src/main/java/com/nexuiz/demorecorder/application/plugins/EncoderPlugin.java
initial checkin from nexuiz svn r8756
[xonotic/xonotic.git] / misc / tools / NexuizDemoRecorder / main / src / main / java / com / nexuiz / demorecorder / application / plugins / EncoderPlugin.java
1 package com.nexuiz.demorecorder.application.plugins;\r
2 \r
3 import java.util.Properties;\r
4 \r
5 import com.nexuiz.demorecorder.application.DemoRecorderApplication;\r
6 import com.nexuiz.demorecorder.application.jobs.RecordJob;\r
7 \r
8 public interface EncoderPlugin {\r
9         \r
10         /**\r
11          * Makes the application layer known to the plug-in, which is required so that the plug-in\r
12          * can access the preferences of the application. Call this method first before using any\r
13          * of the others.\r
14          */\r
15         public void setApplicationLayer(DemoRecorderApplication appLayer);\r
16 \r
17         /**\r
18          * Returns the name of the plug-in. Must not contain a "."\r
19          */\r
20         public String getName();\r
21         \r
22         /**\r
23          * Returns true if the plug-in is enabled (checked from the preferences of the app layer)\r
24          * @return true if the plug-in is enabled\r
25          */\r
26         public boolean isEnabled();\r
27         \r
28         /**\r
29          * Global preferences are preferences of a plug-in that are application-wide and not job-\r
30          * specific. They should be shown in a global preferences dialog.\r
31          * Use this method in order to tell the application layer and GUI which global settings your\r
32          * encoder plug-in offers, and set a reasonable default. Note that for the default-values being\r
33          * set you can either set to "true" or "false", any String (can be empty), or "filechooser" if\r
34          * you want the user to select a file. \r
35          * @return\r
36          */\r
37         public Properties getGlobalPreferences();\r
38         \r
39         /**\r
40          * In order to influence the order of settings being displayed to the user in a UI, return an array\r
41          * of all keys used in the Properties object returned in getGlobalPreferences(), with your desired\r
42          * order.\r
43          * @return\r
44          */\r
45         public String[] getGlobalPreferencesOrder();\r
46         \r
47         /**\r
48          * Here you can return a Properties object that contains keys for values that can be specific to each\r
49          * individual RecordJob. \r
50          * @return\r
51          */\r
52         public Properties getJobSpecificPreferences();\r
53         \r
54         /**\r
55          * In order to influence the order of job-specific settings being displayed to the user in a UI,\r
56          * return an array of all keys used in the Properties object returned in getJobSpecificPreferences(), with\r
57          * your desired order.\r
58          * @return\r
59          */\r
60         public String[] getJobSpecificPreferencesOrder();\r
61         \r
62         /**\r
63          * Will be called by the application layer when a job has been successfully recorded and moved to its\r
64          * final destination. This method has to perform the specific tasks your plug-in is supposed to do.\r
65          * @param job\r
66          * @throws EncoderPluginException\r
67          */\r
68         public void executeEncoder(RecordJob job) throws EncoderPluginException;\r
69 }\r