From b45be8f7148a05d5d0aaa85f5874c3b31ac7b2f0 Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Wed, 10 May 2006 15:28:36 +0000 Subject: [PATCH] Added a second fire reg state method. --- .../icq/ProtocolProviderServiceIcqImpl.java | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java index 663dd84e1..bbd56ad44 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java @@ -368,9 +368,32 @@ private void fireRegistrationStateChanged( State oldJoustSimState, = joustSimStateToRegistrationState(newJoustSimState , newJoustSimStateInfo); + fireRegistrationStateChanged(oldRegistrationState, newRegistrationState + , reasonCode, reason); + + } + + /** + * Creates a RegistrationStateChange event corresponding to the specified + * old and new states and notifies all currently registered listeners. + * + * @param oldState the state that the provider had before the change + * occurred + * @param newState the state that the provider is currently in. + * @param reasonCode a value corresponding to one of the REASON_XXX fields + * of the RegistrationStateChangeEvent class, indicating the reason for this + * state transition. + * @param reason a String further explaining the reason code or null if + * no such explanation is necessary. + */ + private void fireRegistrationStateChanged( RegistrationState oldState, + RegistrationState newState, + int reasonCode, + String reason) + { RegistrationStateChangeEvent event = - new RegistrationStateChangeEvent( this, oldRegistrationState - , newRegistrationState, reasonCode, reason); + new RegistrationStateChangeEvent( + this, newState, newState, reasonCode, reason); logger.debug("Dispatching " + event + " to " + registrationListeners.size()+ " listeners.");