I just want to make a very simple function of msn, to set the personal message of the messenger. I write the following code based on the tutorial "BasicMessenger.java". However, it does log in, while my personal message never changes. Could anybody help me? Thanks a lot!!
"Finally a note on how personal messages are sent to your friends. In contrast to your nickname on MSN, which is centrally stored on the MSN Directory Servers, the Personal Message is not sent to Microsoft and is shared with your friends in a peer-to-peer fashion."
I leart that the personal message is not stored on the Servers like msnname, it seems that it is stored in my local disk. So when I log in my account by Microsoft MSN, the personal message is the original one stored in my harddisk.
So, now my question changes to "where is such a file storing my personal message and how to change it with JML".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2009-10-27
Hi, it's very simple :
public class Messenger{
private String email, motdepasse;
public Messenger(String e,String m,MsnUserStatus msnUserStatus){
email = e;
motdepasse = m;
However, it seems that you didn't notice the implementation of my question.
What I want to know is that how to record this personal message on my local machine so that when I open my Microsoft MSN, my personal message won't changes back to the original one, but not the one I set through my own code.
I'm wondering if there is a way to do so by JML, thank you~
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2009-10-29
I don't think it's possible with this actual librairy…
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just want to make a very simple function of msn, to set the personal message of the messenger. I write the following code based on the tutorial "BasicMessenger.java". However, it does log in, while my personal message never changes. Could anybody help me? Thanks a lot!!
import net.sf.jml.MsnMessenger;
import net.sf.jml.impl.MsnMessengerFactory;
import net.sf.jml.protocol.outgoing.OutgoingUUX;
import net.sf.jml.MsnProtocol;
public class BasicMessenger {
private String email;
private String password;
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
protected void initMessenger(MsnMessenger messenger) {
}
public void start() {
//create MsnMessenger instance
MsnMessenger messenger = MsnMessengerFactory.createMsnMessenger(email,
password);
//log incoming message
//messenger.setLogIncoming(true);
messenger.setLogIncoming(false);
//log outgoing message
//messenger.setLogOutgoing(true);
messenger.setLogOutgoing(false);
initMessenger(messenger);
messenger.login();
String info= "a new personal message";
OutgoingUUX message = new OutgoingUUX(MsnProtocol.MSNP12);
message.setPersonalMessage(info);
messenger.send(message);
}
public static void main(String args) throws Exception {
BasicMessenger messenger = new BasicMessenger();
messenger.setEmail("myemail@hotmail.com");
messenger.setPassword("mypassword");
messenger.start();
}
Actually, it does change my personal message, but as it is written in the website(http://bartdesmet.net/blogs/bart/archive/2005/06/08/967.aspx),
"Finally a note on how personal messages are sent to your friends. In contrast to your nickname on MSN, which is centrally stored on the MSN Directory Servers, the Personal Message is not sent to Microsoft and is shared with your friends in a peer-to-peer fashion."
I leart that the personal message is not stored on the Servers like msnname, it seems that it is stored in my local disk. So when I log in my account by Microsoft MSN, the personal message is the original one stored in my harddisk.
So, now my question changes to "where is such a file storing my personal message and how to change it with JML".
Hi, it's very simple :
public class Messenger{
private String email, motdepasse;
public Messenger(String e,String m,MsnUserStatus msnUserStatus){
email = e;
motdepasse = m;
MsnMessenger messenger = MsnMessengerFactory.createMsnMessenger(email,motdepasse);
messenger.getOwner().setInitPersonalMessage("PERSONAL MESSAGE HERE");
messenger.getOwner().setInitStatus(msnUserStatus);
// log incoming message
messenger.setLogIncoming(true);
// log outgoing message
messenger.setLogOutgoing(true);
messenger.login();
}
Thank you for your reply.
However, it seems that you didn't notice the implementation of my question.
What I want to know is that how to record this personal message on my local machine so that when I open my Microsoft MSN, my personal message won't changes back to the original one, but not the one I set through my own code.
I'm wondering if there is a way to do so by JML, thank you~
I don't think it's possible with this actual librairy…