diff --git a/src/org/jitsi/impl/configuration/ConfigurationServiceImpl.java b/src/org/jitsi/impl/configuration/ConfigurationServiceImpl.java index 990f478dd50c1867890b876fccfc66760c9931b1..422ce08e75882b38bdbe5e454268a6df5a7755b1 100644 --- a/src/org/jitsi/impl/configuration/ConfigurationServiceImpl.java +++ b/src/org/jitsi/impl/configuration/ConfigurationServiceImpl.java @@ -779,6 +779,29 @@ private void storeConfiguration(File file) } } + /** + * Use with caution! Returns the name of the configuration file currently + * used. Placed in HomeDirLocation/HomeDirName + * {@link #getScHomeDirLocation()} + * {@link #getScHomeDirName()} + * @return the name of the configuration file currently used. + */ + public String getConfigurationFilename() + { + try + { + File file = getConfigurationFile(); + if(file != null) + return file.getName(); + } + catch(IOException ex) + { + logger.error("Error loading configuration file", ex); + } + + return null; + } + /** * Returns the configuration file currently used by the implementation. * If there is no such file or this is the first time we reference it diff --git a/src/org/jitsi/service/configuration/ConfigurationService.java b/src/org/jitsi/service/configuration/ConfigurationService.java index 9b91b7ca07425ce132b60e758e251f86f98607bb..fd42d8f7b0ddf928ef71d4ab1cfc8467124cb5e7 100644 --- a/src/org/jitsi/service/configuration/ConfigurationService.java +++ b/src/org/jitsi/service/configuration/ConfigurationService.java @@ -22,7 +22,7 @@ public interface ConfigurationService { /** * The name of the property that indicates the name of the directory where - * SIP Communicator is to store user specific data such as configuration + * Jitsi is to store user specific data such as configuration * files, message and call history as well as is bundle repository. */ public static final String PNAME_SC_HOME_DIR_NAME @@ -30,7 +30,7 @@ public interface ConfigurationService /** * The name of the property that indicates the location of the directory - * where SIP Communicator is to store user specific data such as + * where Jitsi is to store user specific data such as * configuration files, message and call history as well as is bundle * repository. */ @@ -428,24 +428,34 @@ public void reloadConfiguration() public void purgeStoredConfiguration(); /** - * Returns the name of the directory where SIP Communicator is to store user + * Returns the name of the directory where Jitsi is to store user * specific data such as configuration files, message and call history * as well as is bundle repository. * - * @return the name of the directory where SIP Communicator is to store + * @return the name of the directory where Jitsi is to store * user specific data such as configuration files, message and call history * as well as is bundle repository. */ public String getScHomeDirName(); /** - * Returns the location of the directory where SIP Communicator is to store + * Returns the location of the directory where Jitsi is to store * user specific data such as configuration files, message and call history * as well as is bundle repository. * - * @return the location of the directory where SIP Communicator is to store + * @return the location of the directory where Jitsi is to store * user specific data such as configuration files, message and call history * as well as is bundle repository. */ public String getScHomeDirLocation(); + + /** + * Use with caution! + * Returns the name of the configuration file currently + * used. Placed in HomeDirLocation/HomeDirName + * {@link #getScHomeDirLocation()} + * {@link #getScHomeDirName()} + * @return the name of the configuration file currently used. + */ + public String getConfigurationFilename(); }