void CommandConversationConference::execute_j()
{
        Conversation::Ref conversation = skype->get_current_conversation();
        if (conversation) {
                conversation->JoinLiveSession();
        }
}
Пример #2
0
void SkypeFunctions::acceptCall(std::string userName){

    calling = true;
    Conversation::Ref cr;
    if (!skype->GetConversationByIdentity(userName.c_str(), cr)) throw SkypeException("Can't obtain conversation by identity.\n");
    if (!cr->JoinLiveSession()) throw SkypeException("Can't join to live session.\n");
}
void CommandConversationChat::execute_s()
{
        Conversation::Ref conversation = skype->get_current_conversation();
        if (conversation) {
                Message::Ref message;             
                conversation->SetMyTextStatusTo(Participant::WRITING);    
                conversation->PostText(ask("Enter chat message:"), message);
        }
}
Пример #4
0
void SkypeFunctions::stopCall(Sid::String userName){

    Conversation::Ref cv;
    skype->GetConversationByIdentity(userName, cv);
    if (!skype->callFinished)
    {
        cv->LeaveLiveSession();
        calling = false;
    };
}
void CommandConversationConference::execute_h()
{
       Conversation::Ref conversation = skype->get_current_conversation();
        if (conversation) {
                Conversation::LOCAL_LIVESTATUS lstatus;
                conversation->GetPropLocalLivestatus(lstatus);
                if (lstatus != Conversation::ON_HOLD_LOCALLY) {
                        conversation->HoldMyLiveSession();
                } else {
                        conversation->ResumeMyLiveSession();
                }
        }
}
void CommandConversationConference::execute_m()
{
        Conversation::Ref conversation = skype->get_current_conversation();
        if (conversation) {
                bool is_muted = false;
                conversation->GetPropLiveIsMuted(is_muted);
                if (!is_muted) {
                        conversation->MuteMyMicrophone();
                } else {
                        conversation->UnmuteMyMicrophone();
                }
        }
}
void CommandConversationConference::execute_d()
{
        Conversation::Ref conversation = skype->get_current_conversation();
        if (conversation) {
                String dtmfstr = ask("Enter dtmf (1,2,3,4,5,6,7,8,9,0,*,#):");
                Participant::DTMF dtmf;
                if (dtmfstr == "*") {
                        dtmf = Participant::DTMF_STAR;
                } else if (dtmfstr == "#") {
                        dtmf = Participant::DTMF_POUND;
                } else {
                        dtmf = (Participant::DTMF)atoi((const char*)dtmfstr);
                }

                conversation->SendDTMF(dtmf,260);
        }
}
void CommandConversationConference::execute_p()
{
        Conversation::Ref conversation = skype->get_current_conversation();
        if (conversation) {
                Conversation::TYPE ctype;
                conversation->GetPropType(ctype);
                if (ctype == Conversation::DIALOG) {
                        printf("Conversation is not a conference, choose 'ms - spawn a conf' instead\n");
                        return;
                }

                List_String participants;
				bool temp = true; 
                while (temp) {
                        participants.push_back(ask("Add participant:"));
                        temp = (ask_yesno("Add another?") == 0);
                }

                conversation->AddConsumers(participants);
        }
}