~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to clientgui/BOINCDialupManager.h

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Berkeley Open Infrastructure for Network Computing
2
 
// http://boinc.berkeley.edu
3
 
// Copyright (C) 2005 University of California
4
 
//
5
 
// This is free software; you can redistribute it and/or
6
 
// modify it under the terms of the GNU Lesser General Public
7
 
// License as published by the Free Software Foundation;
8
 
// either version 2.1 of the License, or (at your option) any later version.
9
 
//
10
 
// This software 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.
13
 
// See the GNU Lesser General Public License for more details.
14
 
//
15
 
// To view the GNU Lesser General Public License visit
16
 
// http://www.gnu.org/copyleft/lesser.html
17
 
// or write to the Free Software Foundation, Inc.,
18
 
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 
20
 
#ifndef _BOINCDIALUPMANAGER_H_
21
 
#define _BOINCDIALUPMANAGER_H_
22
 
 
23
 
#if defined(__GNUG__) && !defined(__APPLE__)
24
 
#pragma interface "BOINCDialupManager.cpp"
25
 
#endif
26
 
 
27
 
 
28
 
class CBOINCDialUpManager : public wxObject
29
 
{
30
 
public:
31
 
 
32
 
    CBOINCDialUpManager();
33
 
    ~CBOINCDialUpManager();
34
 
 
35
 
    bool IsOk();
36
 
    size_t GetISPNames(wxArrayString& names);
37
 
 
38
 
    void OnPoll();
39
 
 
40
 
    int NotifyUserNeedConnection(bool bNotificationOnly);
41
 
 
42
 
    int Connect();
43
 
    int ConnectionSucceeded();
44
 
    int ConnectionFailed();
45
 
 
46
 
    int NetworkAvailable();
47
 
 
48
 
    int Disconnect();
49
 
 
50
 
    void ResetReminderTimers();
51
 
 
52
 
protected:
53
 
    wxDialUpManager* m_pDialupManager;
54
 
    wxDateTime       m_dtLastDialupAlertSent;
55
 
    wxDateTime       m_dtLastDialupRequest;
56
 
    wxDateTime       m_dtDialupConnectionTimeout;
57
 
    bool             m_bSetConnectionTimer;
58
 
    bool             m_bNotifyConnectionAvailable;
59
 
    bool             m_bConnectedSuccessfully;
60
 
    bool             m_bResetTimers;
61
 
    bool             m_bWasDialing;
62
 
    int              m_iNetworkStatus;
63
 
    int              m_iConnectAttemptRetVal;
64
 
 
65
 
    wxString         m_strDialogTitle;
66
 
};
67
 
 
68
 
 
69
 
#endif
70
 
 
 
1
// This file is part of BOINC.
 
2
// http://boinc.berkeley.edu
 
3
// Copyright (C) 2008 University of California
 
4
//
 
5
// BOINC is free software; you can redistribute it and/or modify it
 
6
// under the terms of the GNU Lesser General Public License
 
7
// as published by the Free Software Foundation,
 
8
// either version 3 of the License, or (at your option) any later version.
 
9
//
 
10
// BOINC 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.
 
13
// See the GNU Lesser General Public License for more details.
 
14
//
 
15
// You should have received a copy of the GNU Lesser General Public License
 
16
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 
17
 
 
18
#ifndef _BOINCDIALUPMANAGER_H_
 
19
#define _BOINCDIALUPMANAGER_H_
 
20
 
 
21
#if defined(__GNUG__) && !defined(__APPLE__)
 
22
#pragma interface "BOINCDialupManager.cpp"
 
23
#endif
 
24
 
 
25
 
 
26
class CBOINCDialUpManager : public wxObject
 
27
{
 
28
public:
 
29
 
 
30
    CBOINCDialUpManager();
 
31
    ~CBOINCDialUpManager();
 
32
 
 
33
    bool IsOk();
 
34
    size_t GetISPNames(wxArrayString& names);
 
35
 
 
36
    void OnPoll();
 
37
 
 
38
    int Connect();
 
39
    int ConnectionSucceeded();
 
40
    int ConnectionFailed();
 
41
 
 
42
    int NetworkAvailable();
 
43
 
 
44
    int Disconnect();
 
45
 
 
46
    void ResetReminderTimers();
 
47
 
 
48
protected:
 
49
    wxDialUpManager* m_pDialupManager;
 
50
    wxDateTime       m_dtLastDialupRequest;
 
51
    wxDateTime       m_dtDialupConnectionTimeout;
 
52
    bool             m_bSetConnectionTimer;
 
53
    bool             m_bNotifyConnectionAvailable;
 
54
    bool             m_bConnectedSuccessfully;
 
55
    bool             m_bResetTimers;
 
56
    bool             m_bWasDialing;
 
57
    int              m_iNetworkStatus;
 
58
    int              m_iConnectAttemptRetVal;
 
59
 
 
60
    wxString         m_strDialogTitle;
 
61
};
 
62
 
 
63
 
 
64
#endif
 
65