]> cgit.babelmonkeys.de Git - jubjub.git/blobdiff - src/core/JubAvatarManager.h
Add User Avatar support
[jubjub.git] / src / core / JubAvatarManager.h
diff --git a/src/core/JubAvatarManager.h b/src/core/JubAvatarManager.h
new file mode 100644 (file)
index 0000000..9565f39
--- /dev/null
@@ -0,0 +1,23 @@
+#import <ObjFW/ObjFW.h>
+#import <ObjXMPP/ObjXMPP.h>
+
+@class JubChatClient;
+@class XMPPContact;
+
+@protocol JubAvatarManagerDelegate
+- (void)contact: (XMPPContact*)contact
+   didSetAvatar: (OFString*)avatarFile;
+@end
+
+@interface JubAvatarManager : OFObject <XMPPConnectionDelegate>
+{
+       JubChatClient *_client;
+       id<JubAvatarManagerDelegate> _delegate;
+       OFMutableString *cachePath;
+}
+@property (assign) id<JubAvatarManagerDelegate> delegate;
+
+- initWithClient: (JubChatClient*)client;
+- (void)Jub_connection: (XMPPConnection*)connection
+      receivedAvatarIQ: (XMPPIQ*)IQ;
+@end