comparison libpurple/server.c @ 23807:ff29208e03ef

propagate from branch 'im.pidgin.pidgin' (head 75f0460d3679231b61d572e76fe02534a597c6b5) to branch 'im.pidgin.pidgin.vv' (head 7872d32a910cd4c1fbc3e2457295e4c1d40188f5)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 27 May 2008 06:27:46 +0000
parents ff8ec3d58367 69d54f84350a
children 7d2e5f57dbca
comparison
equal deleted inserted replaced
23220:01e1468da703 23807:ff29208e03ef
35 #include "request.h" 35 #include "request.h"
36 #include "signals.h" 36 #include "signals.h"
37 #include "server.h" 37 #include "server.h"
38 #include "status.h" 38 #include "status.h"
39 #include "util.h" 39 #include "util.h"
40 #ifdef USE_FARSIGHT
41 #include "media.h"
42 #endif
40 43
41 #define SECS_BEFORE_RESENDING_AUTORESPONSE 600 44 #define SECS_BEFORE_RESENDING_AUTORESPONSE 600
42 #define SEX_BEFORE_RESENDING_AUTORESPONSE "Only after you're married" 45 #define SEX_BEFORE_RESENDING_AUTORESPONSE "Only after you're married"
43 46
44 unsigned int 47 unsigned int
1050 if (!prpl_info->can_receive_file || prpl_info->can_receive_file(gc, who)) { 1053 if (!prpl_info->can_receive_file || prpl_info->can_receive_file(gc, who)) {
1051 prpl_info->send_file(gc, who, file); 1054 prpl_info->send_file(gc, who, file);
1052 } 1055 }
1053 } 1056 }
1054 } 1057 }
1058
1059 #ifdef USE_FARSIGHT
1060 PurpleMedia *serv_initiate_media(PurpleConnection *gc, const char *who,
1061 PurpleMediaStreamType type)
1062 {
1063 PurplePlugin *prpl = NULL;
1064 PurplePluginProtocolInfo *prpl_info = NULL;
1065
1066 if (gc)
1067 prpl = purple_connection_get_prpl(gc);
1068 if (prpl)
1069 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
1070
1071 if (prpl_info && prpl_info->initiate_media) {
1072 /* should check that the protol supports this media type here.... */
1073 return prpl_info->initiate_media(gc, who, type);
1074 } else {
1075 return NULL;
1076 }
1077 }
1078
1079 gboolean
1080 serv_can_do_media(PurpleConnection *gc, const char *who,
1081 PurpleMediaStreamType type)
1082 {
1083 PurplePlugin *prpl = NULL;
1084 PurplePluginProtocolInfo *prpl_info = NULL;
1085
1086 if (gc)
1087 prpl = purple_connection_get_prpl(gc);
1088 if (prpl)
1089 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
1090
1091 if (prpl_info && prpl_info->can_do_media) {
1092 /* should check that the protol supports this media type here.... */
1093 return prpl_info->can_do_media(gc, who, type);
1094 } else {
1095 return FALSE;
1096 }
1097 }
1098
1099 #endif