360 char *notify_argument=0;
361 dbus_message_get_args(dbus_msg, 0,
362 DBUS_TYPE_STRING, ¬ify_argument,
365 Info(
"Notify: "+
string(notify_argument));
367 const vector<string> vec =
Split(notify_argument);
369 if (vec[0]==
"CURRENTUSERHANDLE")
373 Error(
"Wrong user '"+vec[1]+
"' logged in, '"+
fUser+
"' expected!");
379 if (vec[0]==
"CONNSTATUS")
382 if (vec[1]!=
"ONLINE")
384 Error(
"Connection status '"+vec[1]+
"'");
390 if (vec[0]==
"USERSTATUS")
392 if (vec[1]!=
"ONLINE")
394 Info(
"Skype user not visible... setting online.");
403 if (vec[2]==
"ONLINESTATUS")
405 if (vec[3]==
"OFFLINE")
408 Info(
"User '"+vec[1]+
"' changed status to '"+vec[3]+
"'");
412 if (vec[2]==
"RECEIVEDAUTHREQUEST")
426 if (vec[0]==
"CHATMESSAGE")
428 if (vec[2]==
"STATUS" && (vec[3]==
"RECEIVED"|| vec[3]==
"READ"))
430 const uint64_t last = stoll(vec[1]);
442 const string id =
Split(rc)[3];
446 const size_t p = rc.find(
" BODY ");
449 cout<<
"BODY TAG NOT FOUND|" << rc <<
"|" << endl;
496 SendSkypeMessage(
id,
"SYNTAX ERROR\n\nAvailable commands:\nPlease use either 'start', 'stop' or 'status'");
503 const string id = vec[1];
504 if (vec[2]==
"ACTIVITY_TIMESTAMP")
510 if (vec[2]==
"MYROLE")
513 if (vec[2]==
"MEMBERS")
516 if (vec[2]==
"ACTIVEMEMBERS")
519 if (vec[2]==
"STATUS")
523 if (vec[2]==
"TIMESTAMP")
526 if (vec[2]==
"DIALOG_PARTNER")
529 if (vec[2]==
"FRIENDLYNAME")
537 if (vec[2]==
"STATUS" && vec[2]==
"INPROGRESS")
int GetCurrentState() const
return the current state of the machine
string SendDBusMessage(const string &cmd, bool display=true)
uint64_t fLastReadMessage
vector< string > Split(const string &msg)
int Error(const std::string &str)
static const string fAuthorizationMsg
bool SendDBusMessageNB(const string &cmd)
int Info(const std::string &str)
bool SendSkypeMessage(const string &chat, const string &msg)
vector< string > fContacts