File: AGMsg.c

package info (click to toggle)
agsync 0.2-pre-9
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,044 kB
  • ctags: 1,183
  • sloc: ansic: 9,979; sh: 8,390; makefile: 86
file content (124 lines) | stat: -rw-r--r-- 5,177 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* The contents of this file are subject to the Mozilla Public License
 * Version 1.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is Mobile Application Link.
 *
 * The Initial Developer of the Original Code is AvantGo, Inc.
 * Portions created by AvantGo, Inc. are Copyright (C) 1997-1999
 * AvantGo, Inc. All Rights Reserved.
 *
 * Contributor(s):
 */

#include <AGMsg.h>

#define AGMSGStartingStringRsrc		"" \
        "Starting MAL Synchronization."
#define AGMSGRetryingStringRsrc		"" \
        "Retrying MAL Synchronization."
#define AGMSGLookupStringRsrc		"" \
        "Looking up the MAL Server."
#define AGMSGLookupFailedStringRsrc	"" \
        "Error 5453: Could not resolve the MAL Server name."
#define AGMSGConnectingStringRsrc	"" \
        "Connecting to MAL Server."
#define AGMSGConnectingFailedStringRsrc	"" \
        "Error 5455: Failed to connect to the MAL Server."
#define AGMSGCancellingStringRsrc	"" \
        "Canceling."
#define AGMSGDisconnectingRsrc		"" \
        "Disconnecting."
#define AGMSGConnectionClosedStringRsrc "" \
        "Error 5458: The MAL Server unexpectedly closed the connection."
#define AGMSGUnknownFailureStringRsrc		"" \
        "Error 5459: Unknown network error has occurred."
#define AGMSGSendingChangedStringRsrc	"" \
        "Sending data to MAL Server."
#define AGMSGSendingFailedStringRsrc      "" \
        "Error 5461: Could not send data to MAL Server."
#define AGMSGHostLookupFailedStringRsrc    "" \
        "Error 5470: Could not resolve the MAL Server name from the Internet."
#define AGMSGConnectFailedStringRsrc       "" \
        "Error 5471: The MAL Server did not respond to our connect request."
#define AGMSGWaitingForServerStringRsrc		"" \
        "Waiting for MAL Server."
#define AGMSGReadingFailedStringRsrc		"" \
        "Error 5463: Error while reading from the MAL Server."
#define AGMSGProxyDNSErrorStringRsrc		"" \
        "Error 5477: Error resolving proxy host."
#define AGMSGSocksDNSErrorStringRsrc		"" \
        "Error 5478: Error resolving proxy server."
#define AGMSGProxyConnectFailedStringRsrc ""\
        "Error 5472: Error connecting to proxy server."
#define AGMSGBadProxyAuthStringRsrc ""\
        "Error 5479: Bad Proxy Authorization."
#define AGMSGIncompatibleVersionStringRsrc ""\
        "Error 5480: Versions numbers do not match between this server and client."
#define AGMSGInvalidMagicStringRsrc ""\
        "Error 5481: Invalid MAL identification code from server. It is unlikely this is a MAL server."
#define AGMSGServerReadingFailedStringRsrc ""\
        "Error 5482: Error while reading from the device."
#define AGMSGServerInvalidMagicStringRsrc ""\
        "Error 5483: Invalid MAL identification code from device, it is unlikely this is a MAL client."

ExportFunc char *AGGetMsg(uint32 msgId)
{
    switch(msgId) {
    case AGMSGStartingStringId:	
        return AGMSGStartingStringRsrc;
    case AGMSGRetryingStringId:	
        return AGMSGRetryingStringRsrc;
    case AGMSGLookupStringId:	
        return AGMSGLookupStringRsrc;
    case AGMSGLookupFailedStringId:	
        return AGMSGLookupFailedStringRsrc;
    case AGMSGConnectingStringId:	
        return AGMSGConnectingStringRsrc;
    case AGMSGConnectingFailedStringId:	
        return AGMSGConnectingFailedStringRsrc;
    case AGMSGCancellingStringId:	
        return AGMSGCancellingStringRsrc;
    case AGMSGDisconnectingId:	
        return AGMSGDisconnectingRsrc;
    case AGMSGConnectionClosedStringId:	
        return AGMSGConnectionClosedStringRsrc;
    case AGMSGUnknownFailureStringId:	
        return AGMSGUnknownFailureStringRsrc;
    case AGMSGSendingChangedStringId:	
        return AGMSGSendingChangedStringRsrc;
    case AGMSGSendingFailedStringId:    
        return AGMSGSendingFailedStringRsrc;
    case AGMSGHostLookupFailedStringId: 
        return AGMSGHostLookupFailedStringRsrc;
    case AGMSGConnectFailedStringId:    
        return AGMSGConnectFailedStringRsrc;
    case AGMSGReadingFailedStringId:    
        return AGMSGReadingFailedStringRsrc;
    case AGMSGProxyDNSErrorStringId:    
        return AGMSGProxyDNSErrorStringRsrc;
    case AGMSGSocksDNSErrorStringId:    
        return AGMSGSocksDNSErrorStringRsrc;
    case AGMSGProxyConnectFailedStringId: 
        return AGMSGProxyConnectFailedStringRsrc;
    case AGMSG401StringId: 
    case AGMSGBadProxyAuthStringId: 
        return AGMSGBadProxyAuthStringRsrc;
    case AGMSGIncompatibleVersionStringId: 
        return AGMSGIncompatibleVersionStringRsrc;
    case AGMSGInvalidMagicStringId: 
        return AGMSGInvalidMagicStringRsrc;
    case AGMSGServerReadingFailedStringId: 
        return AGMSGServerReadingFailedStringRsrc;
    case AGMSGServerInvalidMagicStringId: 
        return AGMSGServerInvalidMagicStringRsrc;
    }
    return NULL;
}