1 /* 2 # PostgreSQL Database Modeler (pgModeler) 3 # 4 # Copyright 2006-2020 - Raphael Araújo e Silva <raphael@pgmodeler.io> 5 # 6 # This program is free software: you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation version 3. 9 # 10 # This program is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # The complete text of GPLv3 is at LICENSE file on source code root directory. 16 # Also, you can get the complete GNU General Public License at <http://www.gnu.org/licenses/> 17 */ 18 19 /** 20 \ingroup libpgmodeler 21 \class Server 22 \brief Implements the operations to manipulate foreign servers on the database. 23 */ 24 25 #ifndef FOREIGN_SERVER_H 26 #define FOREIGN_SERVER_H 27 28 #include "baseobject.h" 29 #include "foreigndatawrapper.h" 30 31 class ForeignServer: public BaseObject, public ForeignObject { 32 private: 33 //! \brief The foreign data wrapper which manages the server 34 ForeignDataWrapper *fdata_wrapper; 35 36 QString type, version; 37 38 public: 39 ForeignServer(); 40 41 void setType(const QString &type); 42 void setVersion(const QString &version); 43 void setForeignDataWrapper(ForeignDataWrapper *fdw); 44 45 QString getType(); 46 QString getVersion(); 47 ForeignDataWrapper *getForeignDataWrapper(); 48 49 virtual QString getCodeDefinition(unsigned def_type); 50 virtual QString getCodeDefinition(unsigned def_type, bool reduced_form); 51 virtual QString getAlterDefinition(BaseObject *object); 52 }; 53 54 #endif 55