00001
00002
00003
00004
00005
00006
00007 #pragma once
00008
00009 #include <Swiften/Base/API.h>
00010 #include <Swiften/Client/CoreClient.h>
00011 #include <Swiften/Base/SafeString.h>
00012
00013 namespace Swift {
00014 class SoftwareVersionResponder;
00015 class BlindCertificateTrustChecker;
00016 class XMPPRoster;
00017 class XMPPRosterImpl;
00018 class MUCManager;
00019 class XMPPRosterController;
00020 class PresenceOracle;
00021 class PresenceSender;
00022 class DirectedPresenceSender;
00023 class StanzaChannelPresenceSender;
00024 class MUCRegistry;
00025 class Storages;
00026 class MemoryStorages;
00027 class VCardManager;
00028 class AvatarManager;
00029 class CapsManager;
00030 class EntityCapsManager;
00031 class EntityCapsProvider;
00032 class NickResolver;
00033 class SubscriptionManager;
00034 class ClientDiscoManager;
00035 class NickManager;
00036 class FileTransferManager;
00037 class JingleSessionManager;
00038 class FileTransferManager;
00039 class WhiteboardSessionManager;
00040
00047 class SWIFTEN_API Client : public CoreClient {
00048 public:
00056 Client(const JID& jid, const SafeString& password, NetworkFactories* networkFactories, Storages* storages = NULL);
00057 ~Client();
00058
00059
00065 void setSoftwareVersion(const std::string& name, const std::string& version, const std::string& os = "");
00066
00082 XMPPRoster* getRoster() const;
00083
00089 void requestRoster();
00090
00094 boost::shared_ptr<Presence> getLastPresence(const JID& jid) const;
00095
00099 boost::shared_ptr<Presence> getHighestPriorityPresence(const JID& bareJID) const;
00100
00101 PresenceOracle* getPresenceOracle() const {
00102 return presenceOracle;
00103 }
00104
00105 PresenceSender* getPresenceSender() const;
00106
00107 MUCManager* getMUCManager() const {
00108 return mucManager;
00109 }
00110
00111 MUCRegistry* getMUCRegistry() const {
00112 return mucRegistry;
00113 }
00114
00115 VCardManager* getVCardManager() const {
00116 return vcardManager;
00117 }
00118
00119 AvatarManager* getAvatarManager() const {
00120 return avatarManager;
00121 }
00122
00123 EntityCapsProvider* getEntityCapsProvider() const;
00124
00125 NickManager* getNickManager() const;
00126
00127 NickResolver* getNickResolver() const {
00128 return nickResolver;
00129 }
00130
00131 SubscriptionManager* getSubscriptionManager() const {
00132 return subscriptionManager;
00133 }
00134
00135 ClientDiscoManager* getDiscoManager() const {
00136 return discoManager;
00137 }
00138
00145 FileTransferManager* getFileTransferManager() const;
00146
00153 void setAlwaysTrustCertificates();
00154
00155 WhiteboardSessionManager* getWhiteboardSessionManager() const;
00156
00157 public:
00161 boost::signal<void (boost::shared_ptr<Presence>)> onPresenceChange;
00162
00163 private:
00164 Storages* getStorages() const;
00165
00166 protected:
00167 void handleConnected();
00168
00169 private:
00170 Storages* storages;
00171 MemoryStorages* memoryStorages;
00172 SoftwareVersionResponder* softwareVersionResponder;
00173 XMPPRosterImpl* roster;
00174 XMPPRosterController* rosterController;
00175 PresenceOracle* presenceOracle;
00176 DirectedPresenceSender* directedPresenceSender;
00177 StanzaChannelPresenceSender* stanzaChannelPresenceSender;
00178 MUCRegistry* mucRegistry;
00179 VCardManager* vcardManager;
00180 AvatarManager* avatarManager;
00181 CapsManager* capsManager;
00182 EntityCapsManager* entityCapsManager;
00183 NickManager* nickManager;
00184 NickResolver* nickResolver;
00185 SubscriptionManager* subscriptionManager;
00186 MUCManager* mucManager;
00187 ClientDiscoManager* discoManager;
00188 JingleSessionManager* jingleSessionManager;
00189 FileTransferManager* fileTransferManager;
00190 BlindCertificateTrustChecker* blindCertificateTrustChecker;
00191 WhiteboardSessionManager* whiteboardSessionManager;
00192 };
00193 }