00001
00023 #ifndef _MYSOCIALS_DRIVER_H_
00024 #define _MYSOCIALS_DRIVER_H_
00025
00026 #include <glib.h>
00027
00028 #include <libxml/tree.h>
00029 #include <libxml/parser.h>
00030
00031 #define CLASS_SETTINGS "settings"
00032 #define GET_SETTINGS "getSettings"
00033 #define SET_SETTINGS "setSettings"
00034 #define TEST_CONNECTION "testConnection"
00035 #define GET_LIST_METHODS "getListMethods"
00036
00037 #define CLASS_PROFILE "profile"
00038 #define GET_PROFILE "getProfile"
00039 #define GET__BASE_PROFILE "getBaseProfile"
00040 #define SET_PROFILE "setProfile"
00041
00042 #define CLASS_PHOTOS "photos"
00043 #define CREATE_ALBUM "createAlbum"
00044 #define GET_LIST_ALBUMS "getListAlbums"
00045 #define GET_LIST_PHOTOS "getListPhotos"
00046 #define GET_LIST_USER_PHOTOS "getListUserPhotos"
00047 #define GET_LIST_FAVORITE_PHOTOS "getListFavoritePhotos"
00048 #define GET_PHOTO "getPhoto"
00049 #define GET_LIST_PHOTO_TAGS "getListPhotoTags"
00050 #define GET_LIST_PHOTO_COMMENTS "getListPhotoComments"
00051 #define SEND_PHOTO_COMMENT "sendPhotoComment"
00052 #define UPLOAD_PHOTO "uploadPhoto"
00053
00054 #define CLASS_FRIENDS "friends"
00055 #define GET_LIST_FRIENDS "getListFriends"
00056 #define DELETE_FRIEND "deleteFriend"
00057
00058 #define CLASS_MESSAGES "messages"
00059 #define GET_LIST_INBOX_MESSAGES "getListInboxMessages"
00060 #define GET_LIST_OUTBOX_MESSAGES "getListOutboxMessages"
00061 #define GET_TOTAL_COUNT_INBOX "getTotalCountInbox"
00062 #define GET_TOTAL_COUNT_OUTBOX "getTotalCountOutbox"
00063 #define GET_COUNT_INBOX_BYTIME "getCountInboxByTime"
00064 #define GET_COUNT_OUTBOX_BYTIME "getCountOutboxByTime"
00065
00066 #define GET_LIST_THREADS "getListThreads"
00067 #define GET_LIST_THREAD_MESSAGES "getListThreadMessages"
00068
00069 #define GET_NEW_MESSAGES "getNewInboxMessages"
00070 #define READ_MESSAGE "readMessage"
00071 #define SEND_MESSAGE "sendMessage"
00072 #define DELETE_MESSAGE "deleteMessage"
00073 #define GET_LIST_WALL_MESSAGES "getListWallMessages"
00074 #define SEND_WALL_MESSAGE "sendWallMessage"
00075 #define GET_TOTAL_COUNT_WALL "getTotalCountWall"
00076 #define DELETE_WALL_MESSAGE "deleteWallMessage"
00077
00078 #define CLASS_AUDIO "audio"
00079 #define GET_LIST_AUDIO "getListAudio"
00080
00081 #define CLASS_NEWS "news"
00082 #define GET_LIST_NEWS "getListNews"
00083
00084 #define CLASS_SYSTEM_MESSAGES "systemMessages"
00085 #define INFO_MESSAGE "infoMessage"
00086 #define ERROR_MESSAGE "errorMessage"
00087
00093 #define DRV_SETT_ERROR_CODE "101"
00094
00099 #define DRV_AUTH_ERROR_CODE "102"
00100
00104 #define DRV_AUTH_CANCEL_CODE "103"
00105
00111 #define DRV_UNKNOWN_METHOD_CALL "104"
00112
00113
00114 #define DRV_REQ_ERROR_CODE "201"
00115 #define DRV_REQ_PARAM_CODE "202"
00116 #define DRV_MESS_EMPTY_CODE "203"
00117 #define DRV_SERVER_BUSY_CODE "204"
00118 #define DRV_CAPT_ERROR_CODE "205"
00119 #define DRV_ACCESS_ERROR_CODE "206"
00120 #define DRV_SERVER_ERROR_CODE "207"
00121 #define DRV_NETW_ERROR_CODE "208"
00122 #define DRV_RESP_ERROR_CODE "209"
00123 #define DRV_FILE_SAVE_ERROR_CODE "210"
00124
00126 #define DRV_SETT_ERROR "Unable to save settings"
00127 #define L10N_DRV_SETT_ERROR _("Unable to save settings")
00128
00129 #define DRV_AUTH_ERROR "Authorization problem"
00130 #define L10N_DRV_AUTH_ERROR _("Authorization problem")
00131
00132 #define DRV_AUTH_CANCEL "Authorization canceled"
00133 #define L10N_DRV_AUTH_CANCEL _("Authorization canceled")
00134
00135 #define DRV_REQ_ERROR "Unable to perform request"
00136 #define L10N_DRV_REQ_ERROR _("Unable to perform request")
00137
00138 #define DRV_SERVER_BUSY "Server busy"
00139 #define L10N_DRV_SERVER_BUSY _("Server busy")
00140
00141 #define DRV_REQ_PARAM "One of the parameters missing or invalid"
00142 #define L10N_DRV_REQ_PARAM _("One of the parameters missing or invalid")
00143
00144 #define DRV_CAPT_ERROR "Captcha"
00145 #define L10N_DRV_CAPT_ERROR _("Captcha")
00146
00147 #define DRV_RESP_ERROR "Bad response from server"
00148 #define L10N_DRV_RESP_ERROR _("Bad response from server")
00149
00150 #define DRV_NETW_ERROR "Network problem"
00151 #define L10N_DRV_NETW_ERROR _("Network problem")
00152
00153 #define DRV_MESS_LEN "Empty message"
00154 #define L10N_DRV_MESS_LEN _("Empty message")
00155
00156 #define DRV_ACCESS_ERROR "Operation prohibited by privacy"
00157 #define L10N_DRV_ACCESS_ERROR _("Operation prohibited by privacy")
00158
00159 #define DRV_SERVER_ERROR "Internal Server Error"
00160 #define L10N_DRV_SERVER_ERROR _("Internal Server Error")
00161
00162 #define DRV_FILE_SAVE_ERROR "Can't save file"
00163 #define L10N_DRV_FILE_SAVE_ERROR _("Can't save file")
00164
00165
00166 #define FIRST_NAME "FirstName"
00167 #define L10N_FIRST_NAME _("FirstName")
00168
00169 #define LAST_NAME "LastName"
00170 #define L10N_LAST_NAME _("LastName")
00171
00172 #define ACTIVITY "Activity"
00173 #define L10N_ACTIVITY _("Activity")
00174
00175 #define CITY_NAME "CityName"
00176 #define L10N_CITY_NAME _("CityName")
00177
00178 #define COUNTRY_NAME "CountryName"
00179 #define L10N_COUNTRY_NAME _("CountryName")
00180
00181 #define BIRTHDAY_NAME "Birthday"
00182 #define L10N_BIRTHDAY_NAME _("Birthday")
00183
00184 #define GENDER_NAME "Gender"
00185 #define L10N_GENDER_NAME _("Gender")
00186
00187 #define FAMILY_STATE_NAME "FamilyState"
00188 #define L10N_FAMILY_STATE_NAME _("FamilyState")
00189
00190 #define POLITICAL_VIEW_NAME "PoliticalView"
00191 #define L10N_POLITICAL_VIEW_NAME _("PoliticalView")
00192
00193
00194 #define MALE "male"
00195 #define L10N_MALE _("male")
00196
00197 #define FEMALE "female"
00198 #define L10N_FEMALE _("female")
00199
00200 #define NO_MALE "none"
00201 #define L10N_NO_MALE _("none")
00202
00203
00204
00205 typedef enum {
00206 FAILURE = -1,
00207 SUCCESS = 0,
00208 ERROR_ALLOCATION_OF_MEMORY,
00209 ERROR_NO_FUNCTION,
00210 ERROR_INITIALIZATION_ALREADY_PASSED,
00211 ERROR_IS_BUSY,
00212 ERROR_SEND_DATA,
00213 ERROR_PARSE_DATA
00214 } error_type;
00215
00216
00217
00218
00219 #define MODULE_INIT "msa_module_init"
00220 #define MODULE_GET_INFO "msa_module_get_info"
00221
00231 struct msa_module {
00232 gchar* id;
00233 gchar* name;
00234 gchar* driverName;
00235 gchar* pic;
00236 gchar* proxy;
00237 gint port;
00238
00249 error_type (*send)(xmlDocPtr request, xmlDocPtr* response, const struct msa_module* info);
00250
00251 error_type (*shutdown)(const struct msa_module* info);
00252
00253 };
00254
00255
00256 #endif