source: qutecom-2.2/wengophone/src/model/phonecall/PhoneCallStateUnknown.h @ 449:4cb016e9d05a

Last change on this file since 449:4cb016e9d05a was 449:4cb016e9d05a, checked in by Preeteesh, 3 years ago

Patch to fix bug Incase an initial INVITE receives a [3456]XX response the call is ended & it shouldn'd show any message when exiting the application.

File size: 2.9 KB
Line 
1/*
2 * WengoPhone, a voice over Internet phone
3 * Copyright (C) 2004-2006  Wengo
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 */
19;
20#ifndef PHONECALLSTATEUNKNOWN_H
21#define PHONECALLSTATEUNKNOWN_H
22
23#include "PhoneCallState.h"
24
25#include "PhoneCall.h"
26#include <model/wenbox/WenboxPlugin.h>
27
28/**
29 *
30 * @ingroup model
31 * @author Tanguy Krotoff
32 */
33class PhoneCallStateUnknown : public PhoneCallState {
34public:
35
36        EnumPhoneCallState::PhoneCallState getCode() const {
37                return EnumPhoneCallState::PhoneCallStateUnknown;
38        }
39
40        void execute(PhoneCall & phoneCall,bool doublecall = false);
41};
42
43/**
44 *
45 * @ingroup model
46 * @author Preetish Kakkar
47 */
48class PhoneCallStateBusy : public PhoneCallState {
49public:
50
51        EnumPhoneCallState::PhoneCallState getCode() const {
52                return EnumPhoneCallState::PhoneCallStateBusy;
53        }
54
55        void execute(PhoneCall & phoneCall,bool doublecall = false) {
56                WenboxPlugin & wenboxPlugin = phoneCall.getWenboxPlugin();
57                wenboxPlugin.setState(Wenbox::CallClosed);
58        }
59};
60
61/**
62 *
63 * @ingroup model
64 * @author Preetish Kakkar
65 */
66class PhoneCallStateRejected : public PhoneCallState {
67public:
68
69        EnumPhoneCallState::PhoneCallState getCode() const {
70                return EnumPhoneCallState::PhoneCallStateRejected;
71        }
72
73        void execute(PhoneCall & phoneCall,bool doublecall = false) {
74                WenboxPlugin & wenboxPlugin = phoneCall.getWenboxPlugin();
75                wenboxPlugin.setState(Wenbox::CallClosed);     
76        }
77};
78
79/**
80 *
81 * @ingroup model
82 * @author Preetish Kakkar
83 */
84class PhoneCallStateUserNotFound : public PhoneCallState {
85public:
86
87        EnumPhoneCallState::PhoneCallState getCode() const {
88                return EnumPhoneCallState::PhoneCallStateUserNotFound;
89        }
90
91        void execute(PhoneCall & phoneCall,bool doublecall = false) {
92                WenboxPlugin & wenboxPlugin = phoneCall.getWenboxPlugin();
93                wenboxPlugin.setState(Wenbox::CallClosed);
94        }
95};
96
97/**
98 *
99 * @ingroup model
100 * @author Preetish Kakkar
101 */
102class PhoneCallStateUserNotAvailable : public PhoneCallState {
103public:
104
105        EnumPhoneCallState::PhoneCallState getCode() const {
106                return EnumPhoneCallState::PhoneCallStateUserNotAvailable;
107        }
108
109        void execute(PhoneCall & phoneCall,bool doublecall = false) {
110                WenboxPlugin & wenboxPlugin = phoneCall.getWenboxPlugin();
111                wenboxPlugin.setState(Wenbox::CallClosed);
112        }
113};
114
115#endif  //PHONECALLSTATEUNKNOWN_H
Note: See TracBrowser for help on using the repository browser.