1 /* Copyright (C) 2006 Marc Maurer <uwog@uwog.net> 2 * 3 * This program is free software; you can redistribute it and/or 4 * modify it under the terms of the GNU General Public License 5 * as published by the Free Software Foundation; either version 2 6 * of the License, or (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program; if not, write to the Free Software 15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 16 * 02110-1301 USA. 17 */ 18 19 #ifndef AP_DIALOG_COLLABORATIONADDBUDDY_H 20 #define AP_DIALOG_COLLABORATIONADDBUDDY_H 21 22 #include <string> 23 #include "ut_types.h" 24 #include "xap_Frame.h" 25 #include "xap_Dialog.h" 26 #include "xav_View.h" 27 #include "ut_vector.h" 28 29 class ConnectionHandler; 30 31 extern pt2Constructor ap_Dialog_CollaborationAddBuddy_Constructor; 32 33 class AP_Dialog_CollaborationAddBuddy : public XAP_Dialog_NonPersistent 34 { 35 public: 36 AP_Dialog_CollaborationAddBuddy(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 37 virtual ~AP_Dialog_CollaborationAddBuddy(void); 38 39 virtual void runModal(XAP_Frame * pFrame) = 0; 40 41 typedef enum { a_OK, a_CANCEL } tAnswer; 42 getAnswer(void)43 AP_Dialog_CollaborationAddBuddy::tAnswer getAnswer(void) const 44 { return m_answer; } 45 getName()46 const UT_UTF8String& getName() const 47 { return m_name; } 48 49 virtual AccountHandler* _getActiveAccount() = 0; 50 51 protected: 52 // TODO: we need more than just a name in the future, so we need a PropertyMap here _setName(const UT_UTF8String & name)53 void _setName(const UT_UTF8String& name) 54 { m_name = name; } 55 56 AP_Dialog_CollaborationAddBuddy::tAnswer m_answer; 57 58 59 private: 60 UT_UTF8String m_name; 61 }; 62 63 #endif /* AP_DIALOG_COLLABORATIONADDBUDDY_H */ 64