/[debian]/bti/trunk/bti.h
ViewVC logotype

Contents of /bti/trunk/bti.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2709 - (show annotations)
Sat Dec 3 00:00:28 2011 UTC (9 years, 7 months ago) by gregoa
File MIME type: text/plain
File size: 2228 byte(s)
New upstream release
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 int column_output;
69 enum host host;
70 enum action action;
71 void *readline_handle;
72 char *(*readline)(const char *);
73 };
74
75 struct bti_curl_buffer {
76 char *data;
77 struct session *session;
78 enum action action;
79 int length;
80 };
81
82 extern const char twitter_host[];
83 extern const char identica_host[];
84 extern const char twitter_name[];
85 extern const char identica_name[];
86 extern int debug;
87
88 extern void bti_parse_configfile(struct session *session);
89
90 #define dbg(format, arg...) \
91 do { \
92 if (debug) \
93 fprintf(stdout, "bti: %s: " format , __func__ , \
94 ## arg); \
95 } while (0)
96
97
98 #endif

  ViewVC Help
Powered by ViewVC 1.1.26