/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef __NW_PUBLISH_SETTINGS_H__ #define __NW_PUBLISH_SETTINGS_H__ #include "NwExport.h" #include "NwObject.h" #define STL_USING_MEMORY #include "OdaSTL.h" #include "SharedPtr.h" class OdNwPublishSettingsImpl; class OdNwPublishAttribute; /** \details This template class is a specialization of the OdSmartPtr class for OdNwPublishAttribute object pointers. */ typedef OdSmartPtr OdNwPublishAttributePtr; /** \details This class represents an OdNwPublishSettings object. */ class NWDBEXPORT OdNwPublishSettings { public: /** \details Default constructor. Creates a new object of the OdNwPublishSettings class. */ OdNwPublishSettings(); /** \details Move constructor. Creates publish settings from the specified OdNwPublishSettings object. */ OdNwPublishSettings(OdNwPublishSettings&&); /** \details Move assignment operator. */ OdNwPublishSettings& operator=(OdNwPublishSettings&&); /** \details Destructor. Frees allocated resources. */ ~OdNwPublishSettings(); /** \details Returns a pointer to the publish attribute. \returns OdNwPublishAttribute object pointers. */ OdNwPublishAttributePtr getPublishAttr() const; /** \details Returns the title of the publish. \returns Title of the publish. */ OdString getTitle() const; /** \details Sets the title of the publish. \param title [in] Title value. */ void setTitle(const OdString& title); /** \details Returns the subject of the publish. \returns Subject of the publish. */ OdString getSubject() const; /** \details Sets the subject of the publish. \param subject [in] Subject value. */ void setSubject(const OdString& subj); /** \details Returns the author of the publish. \returns Author of the publish. */ OdString getAuthor() const; /** \details Sets the author of the publish. \param author [in] Author value. */ void setAuthor(const OdString& author); /** \details Returns the publisher of the publish. \returns Publisher of the publish. */ OdString getPublisher() const; /** \details Sets the publisher of the publish. \param publisher [in] Publisher value. */ void setPublisher(const OdString& publisher); /** \details Returns the publish date. \returns Datetime value of the publish date. */ tm getPublishDate() const; /** \details Sets the publish date. \param dateTime [in] Datetime value. */ void setPublishDate(tm dateTime); /** \details Returns the copyright of the publish. \returns Copyright of the publish. */ OdString getCopyright() const; /** \details Sets the copyright of the publish. \param copyright [in] Copyright value. */ void setCopyright(const OdString& copyright); /** \details Returns the Published for value of the publish. \returns Published for value of the publish. */ OdString getPublishedFor() const; /** \details Sets the Published for value of the publish. \param publishFor [in] Published for value of the publish. */ void setPublisherFor(const OdString& publishFor); /** \details Returns comments of the publish. \returns Comments of the publish. */ OdString getComments() const; /** \details Sets comments to the publish. \param comments [in] Comments to the publish. */ void setComments(const OdString& comments); /** \details Returns the keywords of the publish. \returns Keywords of the publish. */ OdString getKeywords() const; /** \details Sets the keywords of the publish. \param keywords [in] Keywords value. */ void setKeywords(const OdString& keywords); /** \details Sets a password of the publish. \param password [in] Password value. */ void setPassword(const OdString& password); /** \details Sets the flag can be resaved for the publish. \param canResaved [in] Flag value. \remarks If the flag is true, the publish file can be published and saved. Otherwise, the writeFile method causes the eIsWriteProtected error. */ void setCanBeResaved(bool canResaved); /** \details Gets the expiration date of the publish. \returns Date of expiration as Epoch time. */ time_t getExpiryDateEpoch() const; /** \details Sets the expiration date of the publish. \param timeEpoch [in] Epoch time value. \remarks If the date is provided, the publish file cannot be opened after this date, and attempting to open the file leads to the eNotOpenForRead error. */ void setExpiryDateEpoch(time_t timeEpoch); /** \details Returns an indicator that the file is password protected. \returns The true value if a password is specified. */ bool hasPassword() const; /** \details Removes a password. \remarks Removes the password flag and empties the password value. */ void removePassword(); /** \details Removes an expiratopn date. \remarks Removes the expiration date flag and sets the expiration date to 0. */ void removeExpiryDate(); /** \details Returns an indicator that the expiration date of the publish is set. \returns The true value if the file has an expiration date. */ bool hasExpiryDate() const; /** \details Sets the flag embed externally referenced files for the publish. \param isEmbRcpTxt [in] Flag value. \remarks If the flag is true, will embed externally referenced files, including textures and ReCap files into NWD on publish. */ void setEmbedRecapAndTextures(bool isEmbRcpTxt); /** \details Returns an indicator that the flag of embed externally files is set. \returns The true value if flag is set. */ bool isEmbedRecapAndTextures(); private: friend class OdNwPublishSettingsImpl; std::unique_ptr m_pImpl; }; typedef OdSharedPtr OdNwPublishSettingsPtr; #endif