-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathafpurlparser.h
39 lines (33 loc) · 1.04 KB
/
afpurlparser.h
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
#ifndef AFPURLPARSER_H
#define AFPURLPARSER_H
enum protocol { proto_unknown, proto_AT, proto_TCP, proto_invalid };
typedef struct AFPURLParts {
enum protocol protocol;
char *server;
char *zone; /* for AppleTalk only */
char *username;
char *password;
char *auth;
char *volpass;
char *volume;
} AFPURLParts;
/* Maximum lengths of components (for use in our mounter, using EasyMount) */
#define SERVER_MAX 32
#define ZONE_MAX 32
#define USERNAME_MAX 31
#define PASSWORD_MAX 8
#define VOLPASS_MAX 8
#define VOLUME_MAX 27
#define protoInvalidError 4000
#define noServerOrVolumeNameError 4001
#define serverNameTooLongError 4002
#define volumeNameTooLongError 4003
#define zoneTooLongError 4004
#define usernameTooLongError 4005
#define passwordTooLongError 4006
#define volpassTooLongError 4007
#define passwordWithoutUserError 4008
#define badUAMError 4009
AFPURLParts parseAFPURL(char *url);
int validateAFPURL(AFPURLParts *urlParts);
#endif