Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tidy globals and improve coherency of names. CHECK ALL YOUR NOTIFICAT…

…IONS
  • Loading branch information...
commit a0c5f06cfade100c18528890eb072f498b755098 1 parent d92bf87
Antoine Mercadal authored
View
9 MUC/TNStropheMUCRoom.j
@@ -20,13 +20,18 @@
@import <Foundation/Foundation.j>
-@import "../TNStropheGlobals.j"
-@import "../TNStropheJID.j"
@import "../TNStropheConnection.j"
+@import "../TNStropheJID.j"
@import "../TNStropheStanza.j"
@import "TNStropheMUCRoster.j"
+TNStropheMUCConversationWasUpdatedNotification = @"TNStropheMUCConversationWasUpdatedNotification";
+TNStropheMUCDataReceivedNotification = @"TNStropheMUCDataReceivedNotification";
+TNStropheMUCPrivateMessageWasReceivedNotification = @"TNStropheMUCPrivateMessageWasReceivedNotification";
+TNStropheMUCRosterWasUpdatedNotification = @"TNStropheMUCRosterWasUpdatedNotification";
+TNStropheMUCSubjectWasUpdatedNotification = @"TNStropheMUCSubjectWasUpdatedNotification";
+
/*! @ingroup strophecappuccino
this is an implementation of an XMPP multi-user chat room
View
4 MUC/TNStropheMUCRoster.j
@@ -22,6 +22,10 @@
@import "../TNStropheRosterBase.j"
+TNStropheMUCContactJoinedNotification = @"TNStropheMUCContactJoinedNotification";
+TNStropheMUCContactLeftNotification = @"TNStropheMUCContactLeftNotification";
+
+
/*! @ingroup strophecappuccino
this is an implementation of a basic XMPP Multi-User Chat Roster
*/
View
15 PubSub/TNPubSubController.j
@@ -20,11 +20,16 @@
@import <Foundation/Foundation.j>
-@import "../TNStropheGlobals.j"
@import "../TNStropheConnection.j"
@import "TNPubSubNode.j"
+TNStrophePubSubBatchSubscribeCompleteNotification = @"TNStrophePubSubBatchSubscribeCompleteNotification";
+TNStrophePubSubBatchUnsubscribeCompleteNotification = @"TNStrophePubSubBatchUnsubscribeCompleteNotification";
+TNStrophePubSubNoOldSubscriptionsLeftNotification = @"TNStrophePubSubNoOldSubscriptionsLeft";
+TNStrophePubSubSubscriptionsRetrievedNotification = @"TNStrophePubSubSubscriptionsReceivedNotification";
+
+
/*! @ingroup strophecappuccino
this is an implementation of a XMPP Publish-Subscribe controller
*/
@@ -120,7 +125,7 @@
[batch removeObjectIdenticalTo:[node name]];
if ([batch count] === 0)
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStrophePubSubBatchSubscribeComplete object:self userInfo:params];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStrophePubSubBatchSubscribeCompleteNotification object:self userInfo:params];
}
/*! notification send when a batch unsubscription is done
@@ -135,7 +140,7 @@
[batch removeObjectIdenticalTo:[node name]];
if ([batch count] === 0)
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStrophePubSubBatchUnsubscribeComplete object:self userInfo:params];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStrophePubSubBatchUnsubscribeCompleteNotification object:self userInfo:params];
}
@@ -304,7 +309,7 @@
/*! batch subscribe to nodes
@param someNodes a CPDictionnary servers as key, and CPArray of node names as values
- posts TNStrophePubSubBatchSubscribeComplete when all nodes have been subscribed
+ posts TNStrophePubSubBatchSubscribeCompleteNotification when all nodes have been subscribed
@return batchID an ID for this batch used to establish the relevance of completion notification
*/
- (CPString)subscribeToNodesWithNames:(CPDictionary)someNodes nodesDelegate:(id)aDelegate
@@ -362,7 +367,7 @@
/*! batch unsubscribe to nodes
@param someNodes a CPDictionnary servers as key, and CPArray of node names as values
- posts TNStrophePubSubBatchSubscribeComplete when all nodes have been subscribed
+ posts TNStrophePubSubBatchSubscribeCompleteNotification when all nodes have been subscribed
@return batchID an ID for this batch used to establish the relevance of completion notification
*/
- (CPString)unsubscribeFromNodesWithNames:(CPDictionary)someNodes nodesDelegate:(id)aDelegate
View
51 PubSub/TNPubSubNode.j
@@ -20,17 +20,54 @@
@import <Foundation/Foundation.j>
-@import "../TNStropheGlobals.j"
@import "../TNStropheConnection.j"
@import "../TNStropheStanza.j"
-TNPubSubNodeAffiliationOwner = @"owner";
-TNPubSubNodeAffiliationPublisher = @"publisher";
-TNPubSubNodeAffiliationPublisherOnly = @"publish-only";
-TNPubSubNodeAffiliationMember = @"member";
-TNPubSubNodeAffiliationNone = @"none";
-TNPubSubNodeAffiliationOutcast = @"outcast";
+TNStrophePubSubVarAccessModel = @"pubsub#access_model";
+TNStrophePubSubVarBodyXSLT = @"pubsub#body_xslt";
+TNStrophePubSubVarDeliverNotification = @"pubsub#deliver_notifications";
+TNStrophePubSubVarDeliverPayloads = @"pubsub#deliver_payloads";
+TNStrophePubSubVarItemExpire = @"pubsub#item_expire";
+TNStrophePubSubVarMaxItems = @"pubsub#max_items";
+TNStrophePubSubVarMaxPayloadSize = @"pubsub#max_payload_size";
+TNStrophePubSubVarNotificationType = @"pubsub#notification_type";
+TNStrophePubSubVarNotifyConfig = @"pubsub#notify_config";
+TNStrophePubSubVarNotifyDelete = @"pubsub#notify_delete";
+TNStrophePubSubVarNotifyRectract = @"pubsub#notify_retract";
+TNStrophePubSubVarNotifySub = @"pubsub#notify_sub";
+TNStrophePubSubVarPersistItems = @"pubsub#persist_items";
+TNStrophePubSubVarPresenceBasedDelivery = @"pubsub#presence_based_delivery";
+TNStrophePubSubVarPublishModel = @"pubsub#publish_model";
+TNStrophePubSubVarPurgeOffline = @"pubsub#purge_offline";
+TNStrophePubSubVarRosterGroupAllowed = @"pubsub#roster_groups_allowed";
+TNStrophePubSubVarSendLastPublishedItem = @"pubsub#send_last_published_item";
+TNStrophePubSubVarTitle = @"pubsub#title";
+TNStrophePubSubVarType = @"pubsub#type";
+
+TNStrophePubSubVarAccessModelAuthorize = @"authorize";
+TNStrophePubSubVarAccessModelOpen = @"open";
+TNStrophePubSubVarAccessModelRoster = @"roster";
+TNStrophePubSubVarAccessModelWhitelist = @"whitelist";
+
+TNPubSubNodeAffiliationMember = @"member";
+TNPubSubNodeAffiliationNone = @"none";
+TNPubSubNodeAffiliationOutcast = @"outcast";
+TNPubSubNodeAffiliationOwner = @"owner";
+TNPubSubNodeAffiliationPublisher = @"publisher";
+TNPubSubNodeAffiliationPublisherOnly = @"publish-only";
+
+TNStrophePubSubItemPublishedNotification = @"TNStrophePubSubItemPublishedNotification";
+TNStrophePubSubItemPublishErrorNotification = @"TNStrophePubSubItemPublishErrorNotification";
+TNStrophePubSubItemRetractedNotification = @"TNStrophePubSubItemRetractedNotification";
+TNStrophePubSubItemRetractErrorNotification = @"TNStrophePubSubItemRetractErrorNotification";
+TNStrophePubSubNodeConfiguredNotification = @"TNStrophePubSubNodeConfiguredNotification";
+TNStrophePubSubNodeCreatedNotification = @"TNStrophePubSubNodeCreatedNotification";
+TNStrophePubSubNodeDeletedNotification = @"TNStrophePubSubNodeDeletedNotification";
+TNStrophePubSubNodeEventNotification = @"TNStrophePubSubNodeEventNotification"
+TNStrophePubSubNodeRetrievedNotification = @"TNStrophePubSubNodeRetrievedNotification";
+TNStrophePubSubNodeSubscribedNotification = @"TNStrophePubSubNodeSubscribedNotification";
+TNStrophePubSubNodeUnsubscribedNotification = @"TNStrophePubSubNodeUnsubscribedNotification";
// TODO: Abstract out subscription related stuff into TNPubSubNodeSubscription in order to handle multiple node subscriptions better
View
17 TNStropheClient.j
@@ -20,11 +20,16 @@
@import <Foundation/Foundation.j>
+@import "Resources/Strophe/sha1.js"
@import "TNStropheConnection.j"
@import "TNStropheJID.j"
@import "TNStropheStanza.j"
-@import "Resources/Strophe/sha1.js"
-@import "TNStropheGlobals.j"
+
+
+TNStropheClientPasswordChangedNotification = @"TNStropheClientPasswordChangedNotification";
+TNStropheClientPasswordChangeErrorNotification = @"TNStropheClientPasswordChangeErrorNotification";
+TNStropheClientPresenceUpdatedNotification = @"TNStropheClientPresenceUpdatedNotification";
+TNStropheClientVCardReceivedNotification = @"TNStropheClientVCardReceivedNotification";
@implementation TNStropheClient : CPObject
@@ -376,7 +381,7 @@
}
}
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheClientVCardReceived object:self userInfo:aStanza];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheClientVCardReceivedNotification object:self userInfo:aStanza];
return YES;
}
@@ -467,15 +472,15 @@
}
/*! Called when result of password changing is recieved
- if can send TNStropheClientPasswordChanged or TNStropheClientPasswordChangeError notification
+ if can send TNStropheClientPasswordChangedNotification or TNStropheClientPasswordChangeErrorNotification notification
@param aStanza the stanza containing the answer
*/
- (void)_didChangePassword:(TNStropheStanza)aStanza
{
if ([aStanza type] == @"result")
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheClientPasswordChanged object:self userInfo:aStanza];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheClientPasswordChangedNotification object:self userInfo:aStanza];
else
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheClientPasswordChangeError object:self userInfo:aStanza];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheClientPasswordChangeErrorNotification object:self userInfo:aStanza];
}
@end
View
54 TNStropheConnection.j
@@ -20,10 +20,20 @@
@import <Foundation/Foundation.j>
+@import "Resources/Strophe/sha1.js"
@import "TNStropheJID.j"
@import "TNStropheStanza.j"
-@import "Resources/Strophe/sha1.js"
-@import "TNStropheGlobals.j"
+
+TNStropheConnectionStatusAuthenticatingNotification = @"TNStropheConnectionStatusAuthenticatingNotification"
+TNStropheConnectionStatusAuthFailureNotification = @"TNStropheConnectionStatusAuthFailureNotification";
+TNStropheConnectionStatusConnectedNotification = @"TNStropheConnectionStatusConnectedNotification";
+TNStropheConnectionStatusConnectingNotification = @"TNStropheConnectionStatusConnectingNotification";
+TNStropheConnectionStatusConnectionFailureNotification = @"TNStropheConnectionStatusConnectionFailureNotification";
+TNStropheConnectionStatusDisconnectedNotification = @"TNStropheConnectionStatusDisconnectedNotification";
+TNStropheConnectionStatusDisconnectingNotification = @"TNStropheConnectionStatusDisconnectingNotification";
+TNStropheConnectionStatusErrorNotification = @"TNStropheConnectionStatusErrorNotification";
+TNStropheConnectionStatusWillDisconnectNotification = @"TNStropheConnectionStatusWillDisconnectNotification";
+
var TNStropheTimerRunLoopMode = @"TNStropheTimerRunLoopMode";
@@ -34,37 +44,37 @@ var TNStropheTimerRunLoopMode = @"TNStropheTimerRunLoopMode";
@par Delegate Methods
\c -onStropheConnecting:
- when strophe is connecting (notification TNStropheConnectionStatusConnecting sent)
+ when strophe is connecting (notification TNStropheConnectionStatusConnectingNotification sent)
\c -onStropheConnectFail:
if strophe connection fails (notification TNStropheConnectionStatusFailure sent)
\c -onStropheDisconnecting
- when strophe is disconnecting (notification TNStropheConnectionStatusDisconnecting sent)
+ when strophe is disconnecting (notification TNStropheConnectionStatusDisconnectingNotification sent)
\c -onStropheConnected:
- when strophe is disconnected (notification TNStropheConnectionStatusDisconnected sent)
+ when strophe is disconnected (notification TNStropheConnectionStatusDisconnectedNotification sent)
\c -onStropheConnecting:
- when strophe is connected (notification TNStropheConnectionStatusConnected sent)
+ when strophe is connected (notification TNStropheConnectionStatusConnectedNotification sent)
@par Notifications:
The following notifications are sent by TNStropheConnection:
- #TNStropheConnectionStatusConnecting
+ #TNStropheConnectionStatusConnectingNotification
- #TNStropheConnectionStatusConnected
+ #TNStropheConnectionStatusConnectedNotification
- #TNStropheConnectionStatusDisconnecting
+ #TNStropheConnectionStatusDisconnectingNotification
- #TNStropheConnectionStatusDisconnected
+ #TNStropheConnectionStatusDisconnectedNotification
- #TNStropheConnectionStatusConnectionFailure
+ #TNStropheConnectionStatusConnectionFailureNotification
- # TNStropheConnectionStatusAuthFailure
+ # TNStropheConnectionStatusAuthFailureNotification
- #TNStropheConnectionStatusError
+ #TNStropheConnectionStatusErrorNotification
*/
@implementation TNStropheConnection : CPObject
@@ -219,11 +229,11 @@ var TNStropheTimerRunLoopMode = @"TNStropheTimerRunLoopMode";
{
case Strophe.Status.ERROR:
selector = @selector(onStropheError:);
- notificationName = TNStropheConnectionStatusError;
+ notificationName = TNStropheConnectionStatusErrorNotification;
break;
case Strophe.Status.CONNECTING:
selector = @selector(onStropheConnecting:);
- notificationName = TNStropheConnectionStatusConnecting;
+ notificationName = TNStropheConnectionStatusConnectingNotification;
_giveUpTimer = [CPTimer scheduledTimerWithTimeInterval:_giveupTimeout callback:function(aTimer) {
_currentStatus = Strophe.Status.DISCONNECTED;
_giveUpTimer = nil;
@@ -235,33 +245,33 @@ var TNStropheTimerRunLoopMode = @"TNStropheTimerRunLoopMode";
break;
case Strophe.Status.CONNFAIL:
selector = @selector(onStropheConnectFail:);
- notificationName = TNStropheConnectionStatusConnectionFailure;
+ notificationName = TNStropheConnectionStatusConnectionFailureNotification;
_connected = NO;
break;
case Strophe.Status.AUTHENTICATING:
selector = @selector(onStropheAuthenticating:);
- notificationName = TNStropheConnectionStatusAuthenticating;
+ notificationName = TNStropheConnectionStatusAuthenticatingNotification;
_connected = NO;
break;
case Strophe.Status.AUTHFAIL:
selector = @selector(onStropheAuthFail:);
- notificationName = TNStropheConnectionStatusAuthFailure;
+ notificationName = TNStropheConnectionStatusAuthFailureNotification;
_connected = NO;
break;
case Strophe.Status.DISCONNECTING:
selector = @selector(onStropheDisconnecting:);
- notificationName = TNStropheConnectionStatusDisconnecting;
+ notificationName = TNStropheConnectionStatusDisconnectingNotification;
_connected = YES;
break;
case Strophe.Status.DISCONNECTED:
[self deleteAllRegisteredSelectors];
selector = @selector(onStropheDisconnected:);
- notificationName = TNStropheConnectionStatusDisconnected;
+ notificationName = TNStropheConnectionStatusDisconnectedNotification;
_connected = NO;
break;
case Strophe.Status.CONNECTED:
selector = @selector(onStropheConnected:);
- notificationName = TNStropheConnectionStatusConnected;
+ notificationName = TNStropheConnectionStatusConnectedNotification;
_connected = YES;
if (_giveUpTimer)
[_giveUpTimer invalidate];
@@ -285,7 +295,7 @@ var TNStropheTimerRunLoopMode = @"TNStropheTimerRunLoopMode";
if (_currentStatus === Strophe.Status.DISCONNECTED)
return;
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheConnectionStatusWillDisconnect object:self];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheConnectionStatusWillDisconnectNotification object:self];
_connection.disconnect();
}
View
109 TNStropheContact.j
@@ -20,11 +20,41 @@
@import <Foundation/Foundation.j>
-@import "TNStropheJID.j"
-@import "TNStropheGroup.j"
-@import "TNStropheConnection.j"
@import "TNBase64Image.j"
-@import "TNStropheGlobals.j"
+@import "TNStropheConnection.j"
+@import "TNStropheGroup.j"
+@import "TNStropheJID.j"
+
+
+TNStropheContactStatusAway = @"away";
+TNStropheContactStatusBusy = @"xa";
+TNStropheContactStatusDND = @"dnd";
+TNStropheContactStatusOffline = @"offline";
+TNStropheContactStatusOnline = @"online";
+
+TNStropheContactGroupUpdatedNotification = @"TNStropheContactGroupUpdatedNotification";
+TNStropheContactMessageActiveNotification = @"TNStropheContactMessageActiveNotification";
+TNStropheContactMessageComposingNotification = @"TNStropheContactMessageComposingNotification";
+TNStropheContactMessageGoneNotification = @"TNStropheContactMessageGoneNotification";
+TNStropheContactMessageInactiveNotification = @"TNStropheContactMessageInactiveNotification";
+TNStropheContactMessagePausedNotification = @"TNStropheContactMessagePausedNotification";
+TNStropheContactMessageReceivedNotification = @"TNStropheContactMessageReceivedNotification";
+TNStropheContactMessageSentNotification = @"TNStropheContactMessageSentNotification";
+TNStropheContactMessageTreatedNotification = @"TNStropheContactMessageTreatedNotification";
+TNStropheContactNicknameUpdatedNotification = @"TNStropheContactNicknameUpdatedNotification";
+TNStropheContactPresenceUpdatedNotification = @"TNStropheContactPresenceUpdatedNotification";
+TNStropheContactStanzaSentNotification = @"TNStropheContactStanzaSentNotification"
+TNStropheContactSubscriptionUpdatedNotification = @"TNStropheContactSubscriptionUpdatedNotification";
+TNStropheContactVCardReceivedNotification = @"TNStropheContactVCardReceivedNotification";
+
+
+var TNStropheContactImageOffline,
+ TNStropheContactImageOnline,
+ TNStropheContactImageBusy,
+ TNStropheContactImageAway,
+ TNStropheContactImageDND,
+ TNStropheContactImageNewMessage,
+ TNStropheContactImageNewError;
/*! @ingroup strophecappuccino
@@ -50,11 +80,6 @@
BOOL _isComposing;
BOOL _askingVCard;
- CPImage _imageAway;
- CPImage _imageNewError;
- CPImage _imageNewMessage;
- CPImage _imageOffline;
- CPImage _imageOnline;
CPImage _statusReminder;
}
@@ -78,6 +103,22 @@
#pragma mark -
#pragma mark Initialization
+/*! Initialize the class, by creating the images
+*/
++ (void)initialize
+{
+ var bundle = [CPBundle bundleForClass:TNStropheContact];
+
+ TNStropheContactImageOffline = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Offline.png"]];
+ TNStropheContactImageOnline = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Available.png"]];
+ TNStropheContactImageBusy = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Away.png"]];
+ TNStropheContactImageAway = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Idle.png"]];
+ TNStropheContactImageDND = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Blocked.png"]];
+ TNStropheContactImageNewMessage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"NewMessage.png"]];
+ TNStropheContactImageNewError = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Error.png"]];
+}
+
+
/*! init a TNStropheContact with a given connection
@param aConnection TNStropheConnection to use
@return an initialized TNStropheContact
@@ -86,18 +127,8 @@
{
if (self = [super init])
{
- var bundle = [CPBundle bundleForClass:[self class]];
-
- _imageOffline = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Offline.png"]];
- _imageOnline = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Available.png"]];
- _imageBusy = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Away.png"]];
- _imageAway = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Idle.png"]];
- _imageDND = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Blocked.png"]];
- _imageNewMessage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"NewMessage.png"]];
- _imageNewError = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"Error.png"]];
-
_type = @"contact";
- _statusIcon = _imageOffline;
+ _statusIcon = TNStropheContactImageOffline;
_XMPPShow = TNStropheContactStatusOffline;
_XMPPStatus = @"Offline";
_connection = aConnection;
@@ -149,8 +180,8 @@
var errorCode = [[aStanza firstChildWithName:@"error"] valueForAttribute:@"code"];
_XMPPShow = TNStropheContactStatusOffline;
_XMPPStatus = @"Error code: " + errorCode;
- _statusIcon = _imageNewError;
- _statusReminder = _imageNewError;
+ _statusIcon = TNStropheContactImageNewError;
+ _statusReminder = TNStropheContactImageNewError;
return NO;
case @"unavailable":
[_resources removeObject:resource];
@@ -159,8 +190,8 @@
if ([_resources count] == 0)
{
_XMPPShow = TNStropheContactStatusOffline;
- _statusIcon = _imageOffline;
- _statusReminder = _imageOffline;
+ _statusIcon = TNStropheContactImageOffline;
+ _statusReminder = TNStropheContactImageOffline;
if (presenceStatus)
_XMPPStatus = [presenceStatus text];
@@ -186,8 +217,8 @@
break;
default:
_XMPPShow = TNStropheContactStatusOnline;
- _statusReminder = _imageOnline;
- _statusIcon = _imageOnline;
+ _statusReminder = TNStropheContactImageOnline;
+ _statusIcon = TNStropheContactImageOnline;
_subscription = @"subscribed";
if ([aStanza firstChildWithName:@"show"])
@@ -196,22 +227,22 @@
switch (_XMPPShow)
{
case TNStropheContactStatusBusy:
- _statusIcon = _imageBusy;
- _statusReminder = _imageBusy;
+ _statusIcon = TNStropheContactImageBusy;
+ _statusReminder = TNStropheContactImageBusy;
break;
case TNStropheContactStatusAway:
- _statusIcon = _imageAway;
- _statusReminder = _imageAway;
+ _statusIcon = TNStropheContactImageAway;
+ _statusReminder = TNStropheContactImageAway;
break;
case TNStropheContactStatusDND:
- _statusIcon = _imageDND;
- _statusReminder = _imageDND;
+ _statusIcon = TNStropheContactImageDND;
+ _statusReminder = TNStropheContactImageDND;
break;
}
}
if (_numberOfEvents > 0)
- _statusIcon = _imageNewMessage
+ _statusIcon = TNStropheContactImageNewMessage
if (presenceStatus)
_XMPPStatus = [presenceStatus text];
@@ -472,23 +503,23 @@
userInfo = [CPDictionary dictionaryWithObjectsAndKeys:aStanza, @"stanza", [CPDate date], @"date"];
if ([aStanza containsChildrenWithName:@"composing"])
- [center postNotificationName:TNStropheContactMessageComposing object:self userInfo:userInfo];
+ [center postNotificationName:TNStropheContactMessageComposingNotification object:self userInfo:userInfo];
if ([aStanza containsChildrenWithName:@"paused"])
- [center postNotificationName:TNStropheContactMessagePaused object:self userInfo:userInfo];
+ [center postNotificationName:TNStropheContactMessagePausedNotification object:self userInfo:userInfo];
if ([aStanza containsChildrenWithName:@"active"])
- [center postNotificationName:TNStropheContactMessageActive object:self userInfo:userInfo];
+ [center postNotificationName:TNStropheContactMessageActiveNotification object:self userInfo:userInfo];
if ([aStanza containsChildrenWithName:@"inactive"])
- [center postNotificationName:TNStropheContactMessageInactive object:self userInfo:userInfo];
+ [center postNotificationName:TNStropheContactMessageInactiveNotification object:self userInfo:userInfo];
if ([aStanza containsChildrenWithName:@"gone"])
- [center postNotificationName:TNStropheContactMessageGone object:self userInfo:userInfo];
+ [center postNotificationName:TNStropheContactMessageGoneNotification object:self userInfo:userInfo];
if ([aStanza containsChildrenWithName:@"body"])
{
- _statusIcon = _imageNewMessage;
+ _statusIcon = TNStropheContactImageNewMessage;
[_messagesQueue addObject:aStanza];
_numberOfEvents++;
View
596 TNStropheGlobals.j
@@ -1,596 +0,0 @@
-/*
- * TNStropheGlobals.j
- *
- * Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3.0 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#pragma mark -
-#pragma mark globals of TNStropheConnection
-
-/*!
- @global
- @group TNStropheConnectionStatus
- Notification sent on connecting
-*/
-TNStropheConnectionStatusConnecting = @"TNStropheConnectionStatusConnecting";
-/*!
- @global
- @group TNStropheConnectionStatus
- Notification sent when connected
-*/
-TNStropheConnectionStatusConnected = @"TNStropheConnectionStatusConnected";
-/*!
- @global
- @group TNStropheConnectionStatus
- Notification sent on connection fail
-*/
-TNStropheConnectionStatusConnectionFailure = @"TNStropheConnectionStatusConnectionFailure";
-/*! @global
- @group TNStropheConnectionStatus
- Notification sent when authenticating
-
-*/
-TNStropheConnectionStatusAuthenticating = @"TNStropheConnectionStatusAuthenticating"
-/*!
- @global
- @group TNStropheConnectionStatus
- Notification sent on auth fail
-*/
-TNStropheConnectionStatusAuthFailure = @"TNStropheConnectionStatusAuthFailure";
-
-/*!
- @global
- @group TNStropheConnectionStatus
- Notification when strophe is going to disconnect (but it is still connected)
-*/
-TNStropheConnectionStatusWillDisconnect = @"TNStropheConnectionStatusWillDisconnect";
-
-/*!
- @global
- @group TNStropheConnectionStatus
- Notification sent on disconnecting
-*/
-TNStropheConnectionStatusDisconnecting = @"TNStropheConnectionStatusDisconnecting";
-
-/*!
- @global
- @group TNStropheConnectionStatus
- Notification sent when disconnected
-*/
-TNStropheConnectionStatusDisconnected = @"TNStropheConnectionStatusDisconnected";
-
-/*!
- @global
- @group TNStropheConnectionStatus
- Notification sent when other error occurs
-*/
-TNStropheConnectionStatusError = @"TNStropheConnectionStatusError";
-
-
-#pragma mark -
-#pragma mark globals of TNStropheClient
-
-/*!
- @global
- @group TNStropheClient
- Notification sent when other connection update presence
-*/
-TNStropheClientPresenceUpdatedNotification = @"TNStropheClientPresenceUpdatedNotification";
-
-/*!
- @global
- @group TNStropheClient
- Notification sent on connecting
-*/
-TNStropheClientVCardReceived = @"TNStropheClientVCardReceived";
-
-
-/*!
- @global
- @group TNStropheClient
- Notification sent when sucessfully changed password
-*/
-TNStropheClientPasswordChanged = @"TNStropheClientPasswordChanged";
-
-/*!
- @global
- @group TNStropheClientVCard
- Notification sent when error occured while changing password
-*/
-TNStropheClientPasswordChangeError = @"TNStropheClientPasswordChangeError";
-
-
-#pragma mark -
-#pragma mark globals of TNStropheContact
-
-/*!
- @global
- @group TNStropheContactStatus
- Status away
-*/
-TNStropheContactStatusAway = @"away";
-/*!
- @global
- @group TNStropheContactStatus
- Status Busy
-*/
-TNStropheContactStatusBusy = @"xa";
-/*!
- @global
- @group TNStropheContactStatus
- Status Do Not Disturb
-*/
-TNStropheContactStatusDND = @"dnd";
-/*!
- @global
- @group TNStropheContactStatus
- Status offline
-*/
-TNStropheContactStatusOffline = @"offline";
-/*!
- @global
- @group TNStropheContactStatus
- Status online
-*/
-TNStropheContactStatusOnline = @"online";
-
-/*!
- @global
- @group TNStropheContact
- notification sent when nickname of contact has been updated
-*/
-TNStropheContactNicknameUpdatedNotification = @"TNStropheContactNicknameUpdatedNotification";
-/*!
- @global
- @group TNStropheContact
- notification sent when group of contact have been updated
-*/
-TNStropheContactGroupUpdatedNotification = @"TNStropheContactGroupUpdatedNotification";
-/*!
- @global
- @group TNStropheContact
- notification sent when presence status of contact has been updated
-*/
-TNStropheContactPresenceUpdatedNotification = @"TNStropheContactPresenceUpdatedNotification";
-/*!
- @global
- @group TNStropheContact
- notification sent when subscription status of contact has been updated
-*/
-TNStropheContactSubscriptionUpdatedNotification = @"TNStropheContactSubscriptionUpdatedNotification";
-/*!
- @global
- @group TNStropheContact
- notification sent when contact receive its vCard
-*/
-TNStropheContactVCardReceivedNotification = @"TNStropheContactVCardReceivedNotification";
-/*!
- @global
- @group TNStropheContact
- notification sent when contact receive a message
-*/
-TNStropheContactMessageReceivedNotification = @"TNStropheContactMessageReceivedNotification";
-/*!
- @global
- @group TNStropheContact
- notification sent when all messages in messages queue have been treated
-*/
-TNStropheContactMessageTreatedNotification = @"TNStropheContactMessageTreatedNotification";
-/*!
- @global
- @group TNStropheContact
- notification sent when message have been sent to the contact
-*/
-TNStropheContactMessageSentNotification = @"TNStropheContactMessageSentNotification";
-/*!
- @global
- @group TNStropheContact
- notification sent when stanza have been sent to the contact
-*/
-TNStropheContactStanzaSentNotification = @"TNStropheContactStanzaSentNotification"
-
-/*!
- @global
- @group TNStropheContactMessage
- notification sent when contact is composing a message
-*/
-TNStropheContactMessageComposing = @"TNStropheContactMessageComposing";
-/*!
- @global
- @group TNStropheContactMessage
- notification sent when contact stops composing a message
-*/
-TNStropheContactMessagePaused = @"TNStropheContactMessagePaused";
-/*!
- @global
- @group TNStropheContactMessage
- notification sent when chat with contact is active
-*/
-TNStropheContactMessageActive = @"TNStropheContactMessageActive";
-/*!
- @global
- @group TNStropheContactMessage
- notification sent when chat with contact is unactive
-*/
-TNStropheContactMessageInactive = @"TNStropheContactMessageInactive";
-/*!
- @global
- @group TNStropheContactMessage
- notification sent when contact leave chat (close window most of the time)
-*/
-TNStropheContactMessageGone = @"TNStropheContactMessageGone";
-
-
-#pragma mark -
-#pragma mark globals of TNStropheRoster
-
-/*!
- @global
- @group TNStropheRoster
- notification indicates that TNStropheRoster has received the subgroup delimiter
-*/
-
-TNStropheRosterSubGroupDelimiterReceived = @"TNStropheRosterSubGroupDelimiterReceived"
-
-/*!
- @global
- @group TNStropheRoster
- notification indicates that TNStropheRoster has received the data from the XMPP server
-*/
-TNStropheRosterRetrievedNotification = @"TNStropheRosterRetrievedNotification";
-
-/*!
- @global
- @group TNStropheRoster
- notification indicates that TNStropheRoster has recieved a push (update of content)
-*/
-TNStropheRosterPushNotification = @"TNStropheRosterPushNotification";
-
-/*!
- @global
- @group TNStropheRoster
- notification indicates that TNStropheRoster has recieved a add push
-*/
-TNStropheRosterPushAddedContactNotification = @"TNStropheRosterPushAddedContactNotification";
-
-/*!
- @global
- @group TNStropheRoster
- notification indicates that TNStropheRoster has recieved an update push
-*/
-TNStropheRosterPushUpdatedContactNotification = @"TNStropheRosterPushUpdatedContactNotification";
-
-/*!
- @global
- @group TNStropheRoster
- notification indicates that TNStropheRoster has recieved a remove push
-*/
-TNStropheRosterPushRemovedContactNotification = @"TNStropheRosterPushRemovedContactNotification";
-
-/*!
- @global
- @group TNStropheRoster
- notification indicates that a new contact has been added to the TNStropheRoster
-*/
-TNStropheRosterAddedContactNotification = @"TNStropheRosterAddedContactNotification";
-/*!
- @global
- @group TNStropheRoster
- notification indicates that a new contact has been removed from the TNStropheRoster
-*/
-
-TNStropheRosterRemovedContactNotification = @"TNStropheRosterRemovedContactNotification";
-/*!
- @global
- @group TNStropheRoster
- notification indicates that a new group has been added to the TNStropheRoster
-*/
-TNStropheRosterAddedGroupNotification = @"TNStropheRosterAddedGroupNotification";
-
-/*!
- @global
- @group TNStropheRoster
- notification indicates that a new group has been added to the TNStropheRoster
-*/
-TNStropheRosterRemovedGroupNotification = @"TNStropheRosterRemovedGroupNotification";
-
-
-#pragma mark -
-#pragma mark globals of TNStropheGroup
-
-/*!
- @global
- @group TNStropheGroup
- notification indicates that a group has been renamed
-*/
-TNStropheGroupRenamedNotification = @"TNStropheGroupRenamed";
-
-/*!
- @global
- @group TNStropheGroup
- notification indicates that a group has been removed
-*/
-TNStropheGroupRemovedNotification = @"TNStropheGroupRemoved";
-
-
-
-#pragma mark -
-#pragma mark globals for TNPubSubNode
-
-TNStrophePubSubVarTitle = @"pubsub#title";
-TNStrophePubSubVarDeliverNotification = @"pubsub#deliver_notifications";
-TNStrophePubSubVarDeliverPayloads = @"pubsub#deliver_payloads";
-TNStrophePubSubVarPersistItems = @"pubsub#persist_items";
-TNStrophePubSubVarMaxItems = @"pubsub#max_items";
-TNStrophePubSubVarItemExpire = @"pubsub#item_expire";
-TNStrophePubSubVarAccessModel = @"pubsub#access_model";
-TNStrophePubSubVarRosterGroupAllowed = @"pubsub#roster_groups_allowed";
-TNStrophePubSubVarPublishModel = @"pubsub#publish_model";
-TNStrophePubSubVarPurgeOffline = @"pubsub#purge_offline";
-TNStrophePubSubVarSendLastPublishedItem = @"pubsub#send_last_published_item";
-TNStrophePubSubVarPresenceBasedDelivery = @"pubsub#presence_based_delivery";
-TNStrophePubSubVarNotificationType = @"pubsub#notification_type";
-TNStrophePubSubVarNotifyConfig = @"pubsub#notify_config";
-TNStrophePubSubVarNotifyDelete = @"pubsub#notify_delete";
-TNStrophePubSubVarNotifyRectract = @"pubsub#notify_retract";
-TNStrophePubSubVarNotifySub = @"pubsub#notify_sub";
-TNStrophePubSubVarMaxPayloadSize = @"pubsub#max_payload_size";
-TNStrophePubSubVarType = @"pubsub#type";
-TNStrophePubSubVarBodyXSLT = @"pubsub#body_xslt";
-
-TNStrophePubSubVarAccessModelOpen = @"open";
-TNStrophePubSubVarAccessModelRoster = @"roster";
-TNStrophePubSubVarAccessModelAuthorize = @"authorize";
-TNStrophePubSubVarAccessModelWhitelist = @"whitelist";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub node has been recovered
-*/
-TNStrophePubSubNodeRetrievedNotification = @"TNStrophePubSubNodeRetrievedNotification";
-
-
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub node has been created
-*/
-TNStrophePubSubNodeCreatedNotification = @"TNStrophePubSubNodeCreatedNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub node has been deleted
-*/
-TNStrophePubSubNodeDeletedNotification = @"TNStrophePubSubNodeDeletedNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub node has been configured
-*/
-TNStrophePubSubNodeConfiguredNotification = @"TNStrophePubSubNodeConfiguredNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub item has been published
-*/
-TNStrophePubSubItemPublishedNotification = @"TNStrophePubSubItemPublishedNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub item publication has failed
-*/
-TNStrophePubSubItemPublishErrorNotification = @"TNStrophePubSubItemPublishErrorNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub item has been retracted
-*/
-TNStrophePubSubItemRetractedNotification = @"TNStrophePubSubItemRetractedNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub item retraction has failed
-*/
-TNStrophePubSubItemRetractErrorNotification = @"TNStrophePubSubItemRetractErrorNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub node has been subscribed
-*/
-TNStrophePubSubNodeSubscribedNotification = @"TNStrophePubSubNodeSubscribedNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that a pubsub node has been unsubscribed
-*/
-TNStrophePubSubNodeUnsubscribedNotification = @"TNStrophePubSubNodeUnsubscribedNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that an event has been recieved from the PubSub
-*/
-TNStrophePubSubNodeEventNotification = @"TNStrophePubSubNodeEventNotification"
-
-
-#pragma mark -
-#pragma mark globals for TNPubSubController
-
-/*!
- @global
- @group TNPubSub
- notification indicates that the list of current subscriptions has been recieved from the PubSub
-*/
-TNStrophePubSubSubscriptionsRetrievedNotification = @"TNStrophePubSubSubscriptionsReceivedNotification";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that all subscriptions have been unsubscribed
-*/
-TNStrophePubSubNoOldSubscriptionsLeftNotification = @"TNStrophePubSubNoOldSubscriptionsLeft";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that all subscriptions in a batch have been completed
-*/
-TNStrophePubSubBatchSubscribeComplete = @"TNStrophePubSubBatchSubscribeComplete";
-
-/*!
- @global
- @group TNPubSub
- notification indicates that all unsubscriptions in a batch have been completed
-*/
-TNStrophePubSubBatchUnsubscribeComplete = @"TNStrophePubSubBatchUnsubscribeComplete";
-
-
-#pragma mark -
-#pragma mark globals for TNStropheMUCRoom
-
-/*!
- @global
- @group TNStropheMUCRoom
- notification indicates that an MUC room roster has been updated
-*/
-TNStropheMUCRosterWasUpdatedNotification = @"TNStropheMUCRosterWasUpdatedNotification";
-
-/*!
- @global
- @group TNStropheMUCRoom
- notification indicates that someone has spoken in the MUC room
-*/
-TNStropheMUCConversationWasUpdatedNotification = @"TNStropheMUCConversationWasUpdatedNotification";
-
-/*!
- @global
- @group TNStropheMUCRoom
- notification indicates that a MUC room subject has been updated
-*/
-TNStropheMUCSubjectWasUpdatedNotification = @"TNStropheMUCSubjectWasUpdatedNotification";
-
-/*!
- @global
- @group TNStropheMUCRoom
- notification indicates that data has been received by the MUC (may be non-standard)
-*/
-TNStropheMUCDataReceivedNotification = @"TNStropheMUCDataReceivedNotification";
-
-/*!
- @global
- @group TNStropheMUCRoom
- notification indicates that a MUC member has sent a private message
-*/
-TNStropheMUCPrivateMessageWasReceivedNotification = @"TNStropheMUCPrivateMessageWasReceivedNotification";
-
-#pragma mark -
-#pragma mark globals for TNStropheMUCRoster
-
-/*!
- @global
- @group TNStropheMUCRoster
- notification indicates that a MUC member has entered the room
-*/
-TNStropheMUCContactJoinedNotification = @"TNStropheMUCContactJoinedNotification";
-
-/*!
- @global
- @group TNStropheMUCRoster
- notification indicates that a MUC member has left the room
-*/
-TNStropheMUCContactLeftNotification = @"TNStropheMUCContactLeftNotification";
-
-
-#pragma mark -
-#pragma mark Private Storage
-
-/*!
- @global
- @group TNStrophePrivateStorage
- notification indicates that an object as been set to the XMPP private storage
-*/
-TNStrophePrivateStorageSetNotification = @"TNStrophePrivateStorageSetNotification";
-
-/*!
- @global
- @group TNStrophePrivateStorage
- notification indicates that an error occured while trying to set an object to the XMPP private storage
-*/
-TNStrophePrivateStorageSetErrorNotification = @"TNStrophePrivateStorageSetErrorNotification";
-
-/*!
- @global
- @group TNStrophePrivateStorage
- notification indicates that an error occured while trying to get an object from the XMPP private storage
-*/
-TNStrophePrivateStorageGetErrorNotification = @"TNStrophePrivateStorageGetErrorNotification";
-
-
-#pragma mark -
-#pragma mark TNStropheServerAdministration
-
-/*!
- @global
- @group TNStropheServerAdministration
- notification indicates that an announce has been sent
-*/
-TNStropheServerAdministrationSendAnnouncementNotification = @"TNStropheServerAdministrationSendAnnouncementNotification";
-
-/*!
- @global
- @group TNStropheServerAdministration
- notification indicates that registered users has been fetched
-*/
-TNStropheServerAdministrationGetRegisteredUserNotification = @"TNStropheServerAdministrationGetRegisteredUserNotification";
-
-/*!
- @global
- @group TNStropheServerAdministration
- notification indicates that connected users has been fetched
-*/
-TNStropheServerAdministrationGetConnectedUserNotification = @"TNStropheServerAdministrationGetConnectedUserNotification";
-
-/*!
- @global
- @group TNStropheServerAdministration
- notification indicates that a new user has been registered
-*/
-TNStropheServerAdministrationRegisterUserNotification = @"TNStropheServerAdministrationRegisterUserNotification";
-
-/*!
- @global
- @group TNStropheServerAdministration
- notification indicates that some users has been unregistered
-*/
-TNStropheServerAdministrationUnregisterUserNotification = @"TNStropheServerAdministrationUnregisterUserNotification";
-
-/*!
- @global
- @group TNStropheServerAdministration
- notification indicates that connected users has been enabled or disabled
-*/
-TNStropheServerAdministrationSetUserEnabledNotification = @"TNStropheServerAdministrationSetUserEnabledNotification";
View
9 TNStropheGroup.j
@@ -19,7 +19,14 @@
*/
@import <Foundation/Foundation.j>
-@import "TNStropheGlobals.j"
+
+
+/*!
+ @global
+ @group TNStropheGroup
+ notification indicates that a group has been removed
+*/
+TNStropheGroupRemovedNotification = @"TNStropheGroupRemoved";
/*! @ingroup strophecappuccino
View
7 TNStropheIMClient.j
@@ -20,13 +20,12 @@
@import <Foundation/Foundation.j>
+@import "Resources/Strophe/sha1.js"
+@import "TNStropheClient.j"
@import "TNStropheConnection.j"
@import "TNStropheJID.j"
-@import "TNStropheStanza.j"
-@import "Resources/Strophe/sha1.js"
-@import "TNStropheGlobals.j"
@import "TNStropheRoster.j"
-@import "TNStropheClient.j"
+@import "TNStropheStanza.j"
@implementation TNStropheIMClient : TNStropheClient
View
7 TNStrophePrivateStorage.j
@@ -16,9 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-@import "TNStropheGlobals.j"
@import "TNStropheConnection.j"
+
+TNStrophePrivateStorageGetErrorNotification = @"TNStrophePrivateStorageGetErrorNotification";
+TNStrophePrivateStorageSetErrorNotification = @"TNStrophePrivateStorageSetErrorNotification";
+TNStrophePrivateStorageSetNotification = @"TNStrophePrivateStorageSetNotification";
+
+
function stripHTMLCharCode(str)
{
str = str.replace(/&amp;/g, '&');
View
21 TNStropheRoster.j
@@ -25,6 +25,19 @@
TNStropheRosterRosterDelimiter = @"::";
+TNStropheRosterContactAddedNotification = @"TNStropheRosterContactAddedNotification";
+TNStropheRosterContactRemovedNotification = @"TNStropheRosterContactRemovedNotification";
+TNStropheRosterGroupAddedNotification = @"TNStropheRosterGroupAddedNotification";
+TNStropheRosterGroupRemovedNotification = @"TNStropheRosterGroupRemovedNotification";
+TNStropheRosterGroupRenamedNotification = @"TNStropheRosterGroupRenamedNotification";
+TNStropheRosterPushAddedContactNotification = @"TNStropheRosterPushAddedContactNotification";
+TNStropheRosterPushNotification = @"TNStropheRosterPushNotification";
+TNStropheRosterPushRemovedContactNotification = @"TNStropheRosterPushRemovedContactNotification";
+TNStropheRosterPushUpdatedContactNotification = @"TNStropheRosterPushUpdatedContactNotification";
+TNStropheRosterRetrievedNotification = @"TNStropheRosterRetrievedNotification";
+TNStropheRosterSubGroupDelimiterReceivedNotification = @"TNStropheRosterSubGroupDelimiterReceivedNotification";
+
+
/*! @ingroup strophecappuccino
this is an implementation of a basic XMPP Roster
*/
@@ -114,7 +127,7 @@ TNStropheRosterRosterDelimiter = @"::";
CPLog.error("Cannot get the roster delimiter")
}
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheRosterSubGroupDelimiterReceived object:self];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheRosterSubGroupDelimiterReceivedNotification object:self];
return NO;
}
@@ -514,7 +527,7 @@ TNStropheRosterRosterDelimiter = @"::";
}
}
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheRosterAddedGroupNotification object:[self groupWithPath:aPath]];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheRosterGroupAddedNotification object:[self groupWithPath:aPath]];
}
/*! remove the group at given path. all sub groups of the
@@ -538,7 +551,7 @@ TNStropheRosterRosterDelimiter = @"::";
}
[_groupCache removeObject:group];
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheRosterRemovedGroupNotification object:group];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheRosterGroupRemovedNotification object:group];
}
/*! remove the given group
@@ -734,7 +747,7 @@ TNStropheRosterRosterDelimiter = @"::";
[aGroup setName:[aName uppercaseString]];
[self sendRosterSet:[self getAllContactsTreeFromGroup:aGroup]];
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheGroupRenamedNotification object:self];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheRosterGroupRenamedNotification object:self];
}
View
10 TNStropheRosterBase.j
@@ -20,12 +20,12 @@
@import <Foundation/Foundation.j>
-@import "TNStropheJID.j"
-@import "TNStropheConnection.j";
-@import "TNStropheStanza.j";
-@import "TNStropheGroup.j"
+@import "TNStropheConnection.j"
@import "TNStropheContact.j"
-@import "TNStropheGlobals.j"
+@import "TNStropheGroup.j"
+@import "TNStropheJID.j"
+@import "TNStropheStanza.j"
+
/*! @ingroup strophecappuccino
this is an implementation of the functionality shared between real rosters and MUC memberships
View
10 TNStropheServerAdministration.j
@@ -16,9 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-@import "TNStropheGlobals.j"
@import "TNStropheConnection.j"
+
+TNStropheServerAdministrationGetConnectedUserNotification = @"TNStropheServerAdministrationGetConnectedUserNotification";
+TNStropheServerAdministrationGetRegisteredUserNotification = @"TNStropheServerAdministrationGetRegisteredUserNotification";
+TNStropheServerAdministrationRegisterUserNotification = @"TNStropheServerAdministrationRegisterUserNotification";
+TNStropheServerAdministrationSendAnnouncementNotification = @"TNStropheServerAdministrationSendAnnouncementNotification";
+TNStropheServerAdministrationSetUserEnabledNotification = @"TNStropheServerAdministrationSetUserEnabledNotification";
+TNStropheServerAdministrationUnregisterUserNotification = @"TNStropheServerAdministrationUnregisterUserNotification";
+
+
/*! @ingroup strophecappuccino
This class allows to manage XMPP server using XMPP
*/
Please sign in to comment.
Something went wrong with that request. Please try again.