Changeset 1856 for pjproject/trunk/pjsip-apps/src/pocketpj/SettingsDlg.cpp
- Timestamp:
- Mar 11, 2008 1:18:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pocketpj/SettingsDlg.cpp
r1819 r1856 25 25 #define REG_BUDDY_CNT _T("BuddyCnt") 26 26 #define REG_BUDDY_X _T("Buddy%u") 27 #define REG_ENABLE_EC _T("EnableEC") 28 #define REG_EC_TAIL _T("ECTail") 27 29 28 30 … … 70 72 if (key.QueryValue(dwordVal, REG_USE_STUN) == ERROR_SUCCESS) { 71 73 m_UseStun = dwordVal != 0; 74 } else { 75 m_UseStun = 0; 72 76 } 73 77 74 78 if (key.QueryValue(dwordVal, REG_USE_ICE) == ERROR_SUCCESS) { 75 79 m_UseIce = dwordVal != 0; 80 } else { 81 m_UseIce = 0; 76 82 } 77 83 … … 79 85 if (key.QueryValue(dwordVal, REG_USE_SRTP) == ERROR_SUCCESS) { 80 86 m_UseSrtp = dwordVal != 0; 87 } else { 88 m_UseSrtp = 0; 81 89 } 82 90 … … 85 93 if (key.QueryValue(dwordVal, REG_USE_PUBLISH) == ERROR_SUCCESS) { 86 94 m_UsePublish = dwordVal != 0; 95 } 96 97 cbData = sizeof(dwordVal); 98 if (key.QueryValue(dwordVal, REG_ENABLE_EC) == ERROR_SUCCESS) { 99 m_EchoSuppress = dwordVal != 0; 100 } else { 101 m_EchoSuppress = 0; 102 } 103 104 cbData = sizeof(dwordVal); 105 if (key.QueryValue(dwordVal, REG_EC_TAIL) == ERROR_SUCCESS) { 106 m_EcTail = dwordVal; 107 } else { 108 m_EcTail = 2; 87 109 } 88 110 … … 128 150 key.SetValue(m_UsePublish, REG_USE_PUBLISH); 129 151 152 key.SetValue(m_EchoSuppress, REG_ENABLE_EC); 153 key.SetValue(m_EcTail, REG_EC_TAIL); 154 130 155 key.SetValue(m_BuddyList.GetSize(), REG_BUDDY_CNT); 131 156 132 unsignedi;157 int i; 133 158 for (i=0; i<m_BuddyList.GetSize(); ++i) { 134 159 CString entry; … … 158 183 m_User = _T(""); 159 184 m_Dns = _T(""); 185 m_EchoSuppress = FALSE; 186 m_EcTail = _T(""); 160 187 //}}AFX_DATA_INIT 161 188 … … 169 196 m_User = m_Cfg.m_User; 170 197 m_Dns = m_Cfg.m_DNS; 198 m_EchoSuppress = m_Cfg.m_EchoSuppress; 199 200 CString s; 201 s.Format(_T("%d"), m_Cfg.m_EcTail); 202 m_EcTail = s; 171 203 } 172 204 … … 185 217 DDX_Text(pDX, IDC_USER, m_User); 186 218 DDX_Text(pDX, IDC_DNS, m_Dns); 219 DDX_Check(pDX, IDC_ECHO_SUPPRESS, m_EchoSuppress); 220 DDX_Text(pDX, IDC_EC_TAIL, m_EcTail); 187 221 //}}AFX_DATA_MAP 188 222 } … … 191 225 BEGIN_MESSAGE_MAP(CSettingsDlg, CDialog) 192 226 //{{AFX_MSG_MAP(CSettingsDlg) 193 // NOTE: the ClassWizard will add message map macros here 227 ON_BN_CLICKED(IDC_STUN, OnStun) 228 ON_BN_CLICKED(IDC_ECHO_SUPPRESS, OnEchoSuppress) 194 229 //}}AFX_MSG_MAP 195 230 END_MESSAGE_MAP() … … 204 239 if (rc == IDOK) { 205 240 m_Cfg.m_Domain = m_Domain; 206 m_Cfg.m_UseIce = m_ICE ;241 m_Cfg.m_UseIce = m_ICE != 0; 207 242 m_Cfg.m_Password = m_Passwd; 208 m_Cfg.m_UsePublish = m_PUBLISH ;209 m_Cfg.m_UseSrtp = m_SRTP ;210 m_Cfg.m_UseStun = m_STUN ;243 m_Cfg.m_UsePublish = m_PUBLISH != 0; 244 m_Cfg.m_UseSrtp = m_SRTP != 0; 245 m_Cfg.m_UseStun = m_STUN != 0; 211 246 m_Cfg.m_StunSrv = m_StunSrv; 212 247 m_Cfg.m_User = m_User; 213 248 m_Cfg.m_DNS = m_Dns; 249 m_Cfg.m_EchoSuppress= m_EchoSuppress != 0; 250 m_Cfg.m_EcTail = _ttoi(m_EcTail); 214 251 } 215 252 216 253 return rc; 217 254 } 255 256 void CSettingsDlg::OnStun() 257 { 258 } 259 260 void CSettingsDlg::OnEchoSuppress() 261 { 262 }
Note: See TracChangeset
for help on using the changeset viewer.