1 |
/* |
2 |
* Copyright (C) 2008-2011 Greg Kroah-Hartman <greg@kroah.com> |
3 |
* Copyright (C) 2009 Bart Trojanowski <bart@jukie.net> |
4 |
* Copyright (C) 2009-2010 Amir Mohammad Saied <amirsaied@gmail.com> |
5 |
* |
6 |
* This program is free software; you can redistribute it and/or modify it |
7 |
* under the terms of the GNU General Public License as published by the |
8 |
* Free Software Foundation version 2 of the License. |
9 |
* |
10 |
* This program is distributed in the hope that it will be useful, but |
11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 |
* General Public License for more details. |
14 |
* |
15 |
* You should have received a copy of the GNU General Public License along |
16 |
* with this program; if not, write to the Free Software Foundation, Inc., |
17 |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
18 |
*/ |
19 |
|
20 |
#ifndef __BTI_H |
21 |
#define __BTI_H |
22 |
|
23 |
enum host { |
24 |
HOST_TWITTER = 0, |
25 |
HOST_IDENTICA = 1, |
26 |
HOST_CUSTOM = 2 |
27 |
}; |
28 |
|
29 |
enum action { |
30 |
ACTION_UPDATE = 0, |
31 |
ACTION_FRIENDS = 1, |
32 |
ACTION_USER = 2, |
33 |
ACTION_REPLIES = 4, |
34 |
ACTION_PUBLIC = 8, |
35 |
ACTION_GROUP = 16, |
36 |
ACTION_RETWEET = 32, |
37 |
ACTION_UNKNOWN = 64 |
38 |
}; |
39 |
|
40 |
struct session { |
41 |
char *password; |
42 |
char *account; |
43 |
char *consumer_key; |
44 |
char *consumer_secret; |
45 |
char *access_token_key; |
46 |
char *access_token_secret; |
47 |
char *tweet; |
48 |
char *proxy; |
49 |
char *time; |
50 |
char *homedir; |
51 |
char *logfile; |
52 |
char *user; |
53 |
char *group; |
54 |
char *hosturl; |
55 |
char *hostname; |
56 |
char *configfile; |
57 |
char *replyto; |
58 |
char *retweet; |
59 |
int bash; |
60 |
int background; |
61 |
int interactive; |
62 |
int shrink_urls; |
63 |
int dry_run; |
64 |
int page; |
65 |
int no_oauth; |
66 |
int guest; |
67 |
int verbose; |
68 |
enum host host; |
69 |
enum action action; |
70 |
void *readline_handle; |
71 |
char *(*readline)(const char *); |
72 |
}; |
73 |
|
74 |
struct bti_curl_buffer { |
75 |
char *data; |
76 |
struct session *session; |
77 |
enum action action; |
78 |
int length; |
79 |
}; |
80 |
|
81 |
extern const char twitter_host[]; |
82 |
extern const char identica_host[]; |
83 |
extern const char twitter_name[]; |
84 |
extern const char identica_name[]; |
85 |
|
86 |
extern void bti_parse_configfile(struct session *session); |
87 |
|
88 |
#endif |