[sip-comm-dev] GSoC 09[Setting Display Picture]- Progress


#1

Hi,
    Thanks Damian for the information. I had just taken
ServerStoredAccountInfo as a class for storing account information and not
making any changes in it.

My progress regarding different protocols:

Jabber:
*For Jabber there was no existing code for either adddetail() or
replaceDetail()
*I have implemented both for Display Picture. In Jabber to change any detail
we need to upload a full VCard. That is even for a single change the whole
VCard needs to be uploaded. Because of this there is no real difference in
implementation for addDetail() or replaceDetail(). The only difference is in
prior checking conditions of both the functions.
*Another point is that in Jabber implementation, the function
isDetailCalssSupported() cant be used for addDetail() as the function only
returns values that were found by InfoRetreiver while parsing the VCard().
For in my case if initially the avatar was set to null then it will not be
returned as a supported class.
*Also as implemented in addDetail or replaceDetail of ICQ implementation,
there is no code for different supportedTypes. So I have used the
detailDisplayName as found in ServerStoredDetails for branching for
different details.

MSN:
*There is no ServerStoredAccountInfo for MSN protocol.
*I will implement the classes ServerStoredAccountInfo and InfoRetreiver for
all functions related to Display Picture.

joscar:
*ServerStoredAccountInfo is only implemented when using ICQ agent.

I have implemented the functions for Jabber protocol in
OperationSetServerStoredAccountInfoJabberImpl.java
I have also attached the same file for review. All changes are in function
addDetail() and replaceDetail()
Will commit all changes including those in gui part as soon as our branch is
created,

Next I will be implementing the same for MSN protocol after I getting
reviews for Jabber implementation.

OperationSetServerStoredAccountInfoJabberImpl.java (11.7 KB)

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org


#2

Hi Shashank,

I have a question about the operation set : in addDetail() or replaceDetail()
VCard v1 = new VCard();
v1.load(jabberProvider.getConnection());
VCard v2 = new VCard();
v2 = v1;

Why don't you change the avatar directly on v1 ? Is this a special hack ?
Because fro my point of view (reinforced by my colleagues), the action
v2 = v1 copy the pointer v1 into v2 since they're objets.

If you want to have a real copy of the VCard v1, you need to use the clone
method.

The other big point is : don't forget the code convention, particularly on the
opening braces and the imports.

As dev observer, you havn't the commit rights on subversion. But you can
send a patch (svn diff) so I (and other devs) can try your implementation.
The code will be commit at the end of the GSoC.

Bye

Damien

···

2009/6/1 shashank <aug21st@gmail.com>:

Hi,
Thanks Damian for the information. I had just taken
ServerStoredAccountInfo as a class for storing account information and not
making any changes in it.

My progress regarding different protocols:

Jabber:
*For Jabber there was no existing code for either adddetail() or
replaceDetail()
*I have implemented both for Display Picture. In Jabber to change any detail
we need to upload a full VCard. That is even for a single change the whole
VCard needs to be uploaded. Because of this there is no real difference in
implementation for addDetail() or replaceDetail(). The only difference is in
prior checking conditions of both the functions.
*Another point is that in Jabber implementation, the function
isDetailCalssSupported() cant be used for addDetail() as the function only
returns values that were found by InfoRetreiver while parsing the VCard().
For in my case if initially the avatar was set to null then it will not be
returned as a supported class.
*Also as implemented in addDetail or replaceDetail of ICQ implementation,
there is no code for different supportedTypes. So I have used the
detailDisplayName as found in ServerStoredDetails for branching for
different details.

MSN:
*There is no ServerStoredAccountInfo for MSN protocol.
*I will implement the classes ServerStoredAccountInfo and InfoRetreiver for
all functions related to Display Picture.

joscar:
*ServerStoredAccountInfo is only implemented when using ICQ agent.

I have implemented the functions for Jabber protocol in
OperationSetServerStoredAccountInfoJabberImpl.java
I have also attached the same file for review. All changes are in function
addDetail() and replaceDetail()
Will commit all changes including those in gui part as soon as our branch is
created,

Next I will be implementing the same for MSN protocol after I getting
reviews for Jabber implementation.

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi,
    I get an error when you try to save the VCard that has been loaded from
the server. It worked this wa so I left it like this.

For formatting currently I just used the format option of Netbeans. Before
committing anything I will follow all conventions.

Will send the SVN diff patch but it will take some time as there are many
other changes that I have made for my own understanding. Will need to make a
new copy and take out only changes required for Jabber and MSN.

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

Sent from Kanpur, UP, India

On Wed, Jun 3, 2009 at 6:18 PM, Damien Roth <damien.roth@gmail.com> wrote:

Hi Shashank,

I have a question about the operation set : in addDetail() or
replaceDetail()
VCard v1 = new VCard();
v1.load(jabberProvider.getConnection());
VCard v2 = new VCard();
v2 = v1;

Why don't you change the avatar directly on v1 ? Is this a special hack ?
Because fro my point of view (reinforced by my colleagues), the action
v2 = v1 copy the pointer v1 into v2 since they're objets.

If you want to have a real copy of the VCard v1, you need to use the clone
method.

The other big point is : don't forget the code convention, particularly on
the
opening braces and the imports.

As dev observer, you havn't the commit rights on subversion. But you can
send a patch (svn diff) so I (and other devs) can try your implementation.
The code will be commit at the end of the GSoC.

Bye

Damien

2009/6/1 shashank <aug21st@gmail.com>:
> Hi,
> Thanks Damian for the information. I had just taken
> ServerStoredAccountInfo as a class for storing account information and
not
> making any changes in it.
>
> My progress regarding different protocols:
>
> Jabber:
> *For Jabber there was no existing code for either adddetail() or
> replaceDetail()
> *I have implemented both for Display Picture. In Jabber to change any
detail
> we need to upload a full VCard. That is even for a single change the
whole
> VCard needs to be uploaded. Because of this there is no real difference
in
> implementation for addDetail() or replaceDetail(). The only difference is
in
> prior checking conditions of both the functions.
> *Another point is that in Jabber implementation, the function
> isDetailCalssSupported() cant be used for addDetail() as the function
only
> returns values that were found by InfoRetreiver while parsing the
VCard().
> For in my case if initially the avatar was set to null then it will not
be
> returned as a supported class.
> *Also as implemented in addDetail or replaceDetail of ICQ implementation,
> there is no code for different supportedTypes. So I have used the
> detailDisplayName as found in ServerStoredDetails for branching for
> different details.
>
> MSN:
> *There is no ServerStoredAccountInfo for MSN protocol.
> *I will implement the classes ServerStoredAccountInfo and InfoRetreiver
for
> all functions related to Display Picture.
>
> joscar:
> *ServerStoredAccountInfo is only implemented when using ICQ agent.
>
> I have implemented the functions for Jabber protocol in
> OperationSetServerStoredAccountInfoJabberImpl.java
> I have also attached the same file for review. All changes are in
function
> addDetail() and replaceDetail()
> Will commit all changes including those in gui part as soon as our branch
is
> created,
>
> Next I will be implementing the same for MSN protocol after I getting
> reviews for Jabber implementation.
>
> -----
> Shashank Tyagi,
> Computer Science(IDD),
> Part III,
> Institute of Technology,
> Banaras Hindu University,
> India.
> +91-9651422932
> +91-9235600751
> shashank.tyagi.cse06@itbhu.ac.in
> shashankt@acm.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
> For additional commands, e-mail: dev-help@sip-communicator.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi,
    Have attached the patch file. Have also tried to conform to Code
conventions but do point out any omissions.

Features in patch:
*Implementation of Avatar Setting in Jabber.
*Image resized to 96x96

Have also included implementation in MSN for Damian to check out the problem
I had talked about earlier.

Also I just downloaded a new copy of SC from svn but am error in it:
If i disconnect from my MSN account and then try to reconnect then it gives
the following error:

05:30:37.174 SEVERE: net.sf.jml.net.Session.close() error shutting down
input on socket
java.net.SocketException: Socket is closed
        at java.net.Socket.shutdownInput(Socket.java:1357)
        at net.sf.jml.net.Session.close(Session.java:375)
        at net.sf.jml.protocol.MsnSession.close(MsnSession.java:176)
        at net.sf.jml.impl.BasicMessenger.logout(BasicMessenger.java:108)
        at net.sf.jml.impl.SimpleMessenger.logout(SimpleMessenger.java:55)
        at
net.sf.jml.impl.BasicMessenger$MessengerSessionListener.sessionClosed(BasicMessenger.java:339)
        at net.sf.jml.net.Session.fireSessionClosed(Session.java:320)
        at net.sf.jml.net.Session.close(Session.java:406)
        at net.sf.jml.protocol.MsnSession.close(MsnSession.java:176)
        at net.sf.jml.impl.BasicMessenger.logout(BasicMessenger.java:108)
        at net.sf.jml.impl.SimpleMessenger.logout(SimpleMessenger.java:55)
        at
net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl.unregister(ProtocolProviderServiceMsnImpl.java:220)
        at
net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl.unregister(ProtocolProviderServiceMsnImpl.java:208)
        at
net.java.sip.communicator.impl.gui.main.login.LoginManager$UnregisterProvider.run(LoginManager.java:518)
05:30:37.187 SEVERE: net.sf.jml.net.Session.close() error flushing remaining
output on socket
java.net.SocketException: Socket is closed
        at java.net.Socket.getOutputStream(Socket.java:808)
        at net.sf.jml.net.Session.close(Session.java:382)
        at net.sf.jml.protocol.MsnSession.close(MsnSession.java:176)
        at net.sf.jml.impl.BasicMessenger.logout(BasicMessenger.java:108)
        at net.sf.jml.impl.SimpleMessenger.logout(SimpleMessenger.java:55)
        at
net.sf.jml.impl.BasicMessenger$MessengerSessionListener.sessionClosed(BasicMessenger.java:339)
        at net.sf.jml.net.Session.fireSessionClosed(Session.java:320)
        at net.sf.jml.net.Session.close(Session.java:406)
        at net.sf.jml.protocol.MsnSession.close(MsnSession.java:176)
        at net.sf.jml.impl.BasicMessenger.logout(BasicMessenger.java:108)
        at net.sf.jml.impl.SimpleMessenger.logout(SimpleMessenger.java:55)
        at
net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl.unregister(ProtocolProviderServiceMsnImpl.java:220)
        at
net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl.unregister(ProtocolProviderServiceMsnImpl.java:208)
        at
net.java.sip.communicator.impl.gui.main.login.LoginManager$UnregisterProvider.run(LoginManager.java:518)
05:30:40.311 SEVERE: impl.gui.main.login.LoginManager.run().391 Failed to
register protocol provider.
java.util.concurrent.RejectedExecutionException
        at
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1760)
        at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
        at
java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:216)
        at
java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:417)
        at
net.sf.jml.message.p2p.DisplayPictureDuelManager.<init>(DisplayPictureDuelManager.java:40)
        at
net.sf.jml.impl.AbstractMessenger.<init>(AbstractMessenger.java:186)
        at net.sf.jml.impl.BasicMessenger.<init>(BasicMessenger.java:77)
        at net.sf.jml.impl.SimpleMessenger.<init>(SimpleMessenger.java:38)
        at
net.sf.jml.impl.MsnMessengerFactory.createMsnMessenger(MsnMessengerFactory.java:44)
        at
net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl.connectAndLogin(ProtocolProviderServiceMsnImpl.java:180)
        at
net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl.register(ProtocolProviderServiceMsnImpl.java:98)
        at
net.java.sip.communicator.impl.gui.main.login.LoginManager$RegisterProvider.run(LoginManager.java:383)

The error remains even after removing my changes in
ProtocolProviderServiceMsnImpl.java

avatarsetting.patch (35.4 KB)

···

-----
Shashank Tyagi,
Computer Science(IDD),
Part III,
Institute of Technology,
Banaras Hindu University,
India.
+91-9651422932
+91-9235600751
shashank.tyagi.cse06@itbhu.ac.in
shashankt@acm.org

Sent from Lucknow, UP, India