• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

SIPSimpleAccountHandler.h

Go to the documentation of this file.
00001 /* Copyright (C) 2010 AbiSource Corporation B.V.
00002  *
00003  * This program is free software; you can redistribute it and/or
00004  * modify it under the terms of the GNU General Public License
00005  * as published by the Free Software Foundation; either version 2
00006  * of the License, or (at your option) any later version.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00016  * 02110-1301 USA.
00017  */
00018 
00019 #ifndef __SIPSIMPLEACCOUNTHANDLER__
00020 #define __SIPSIMPLEACCOUNTHANDLER__
00021 
00022 #include <string>
00023 
00024 #include <account/xp/AccountHandler.h>
00025 #include "ut_string_class.h"
00026 #include "ut_types.h"
00027 #include "SIPSimpleBuddy.h"
00028 
00029 extern AccountHandlerConstructor SIPSimpleAccountHandlerConstructor;
00030 
00031 class SIPSimpleAccountHandler : public AccountHandler
00032 {
00033 public:
00034     SIPSimpleAccountHandler();
00035     virtual ~SIPSimpleAccountHandler(void);
00036 
00037     // housekeeping
00038     static UT_UTF8String    getStaticStorageType();
00039     virtual UT_UTF8String   getStorageType()
00040         { return getStaticStorageType(); }
00041     virtual UT_UTF8String   getDescription();
00042     virtual UT_UTF8String   getDisplayType();
00043 
00044     // connection management
00045     virtual ConnectResult   connect();
00046     virtual bool            disconnect(void);
00047     virtual bool            isOnline();
00048 
00049     // dialog management
00050     virtual void            embedDialogWidgets(void* pEmbeddingParent) = 0;
00051     virtual void            removeDialogWidgets(void* pEmbeddingParent) = 0;
00052     virtual void            storeProperties() = 0;
00053 
00054     // user management
00055     virtual BuddyPtr        constructBuddy(const PropertyMap& vProps);
00056     virtual BuddyPtr        constructBuddy(const std::string& descriptor, BuddyPtr pBuddy);
00057     virtual bool            recognizeBuddyIdentifier(const std::string& identifier);
00058     virtual bool            allowsManualBuddies()
00059         { return true; }
00060 
00061     virtual void            forceDisconnectBuddy(BuddyPtr) { /* TODO: implement me? */ }
00062     virtual bool            hasPersistentAccessControl()
00063         { return true; }
00064 
00065     // session management
00066     virtual bool            allowsSessionTakeover()
00067         { return false; } // no technical reason not to allow this; we just didn't implement session takeover for this backend yet
00068 
00069         // packet management
00070     virtual bool            send(const Packet* pPacket);
00071     virtual bool            send(const Packet* pPacket, BuddyPtr pBuddy);
00072 
00073 private:
00074 };
00075 
00076 #endif /* __SIPSIMPLEACCOUNTHANDLER__ */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1