+ EmbeddedFile(std::string const & file = std::string(),
+ std::string const & buffer_path = std::string());
+
+ /// set filename and inzipName.
+ /**
+ * NOTE: inzip_name_ is not unique across operation systems and is not
+ * guaranteed to be the same across different versions of LyX.
+ * inzip_name_ will be saved to the LyX file, and is used to indicate
+ * whether or not a file is embedded, and where the embedded file is in
+ * the bundled file. When a file is read, the stored inzip names are used
+ * at first. EmbeddedFiles::validate() will then scan these embedded files
+ * and update their inzip name, moving bundled files around if needed.
+ * This scheme has the advantage that it is safe to change how inzip files
+ * are saved in a bundled file.
+ *
+ * NOTE that this treatment does not welcome an UUID solution because
+ * all embedded files will have to be renamed when an embedded file is
+ * opened. It is of course possible to use saved inzipname, but that is
+ * not easy. For example, when a new EmbeddedFile is created with the same
+ * file as an old one, it needs to be synced to the old inzipname...
+ **/
+ void set(std::string const & filename, std::string const & buffer_path);
+ /** Set the inzip name of an EmbeddedFile, which should be the name
+ * of an actual embedded file on disk.
+ */
+ void setInzipName(std::string const & name);