Changeset 20480
- Timestamp:
- 03/12/13 21:11:34 (11 years ago)
- Location:
- titan/titan
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/httpd.h
r20407 r20480 148 148 *param++ = '\0'; 149 149 150 if(ostrcmp(query, "getsysteminfo") == 0) 150 if(ostrcmp(query, "getchannellock") == 0) 151 buf = webgetchannellock(param, fmt); 152 else if(ostrcmp(query, "getsysteminfo") == 0) 151 153 buf = webgetsysteminfo(fmt); 152 if(ostrcmp(query, "getrccodes") == 0)154 else if(ostrcmp(query, "getrccodes") == 0) 153 155 buf = webgetrccodes(fmt); 154 if(ostrcmp(query, "getmute") == 0)156 else if(ostrcmp(query, "getmute") == 0) 155 157 buf = webgetmute(fmt); 156 if(ostrcmp(query, "getvol") == 0)158 else if(ostrcmp(query, "getvol") == 0) 157 159 buf = webgetvol(fmt); 158 if(ostrcmp(query, "sendrc") == 0)160 else if(ostrcmp(query, "sendrc") == 0) 159 161 websendrc(param, fmt); 160 if(ostrcmp(query, "getrectimer") == 0)162 else if(ostrcmp(query, "getrectimer") == 0) 161 163 buf = webgetrectimer(param, 0, fmt); 162 if(ostrcmp(query, "addrectimer") == 0)164 else if(ostrcmp(query, "addrectimer") == 0) 163 165 buf = webaddrectimer(param, fmt); 164 if(ostrcmp(query, "delrectimer") == 0)166 else if(ostrcmp(query, "delrectimer") == 0) 165 167 buf = webdelrectimer(param, fmt); 166 if(ostrcmp(query, "editrectimer") == 0)168 else if(ostrcmp(query, "editrectimer") == 0) 167 169 buf = webeditrectimer(param, fmt); 168 if(ostrcmp(query, "rectimersend") == 0)170 else if(ostrcmp(query, "rectimersend") == 0) 169 171 buf = webrectimersend(param, fmt); 170 if(ostrcmp(query, "getrectimerarchive") == 0)172 else if(ostrcmp(query, "getrectimerarchive") == 0) 171 173 buf = webgetrectimer(param, 1, fmt); 172 if(ostrcmp(query, "setvol") == 0)174 else if(ostrcmp(query, "setvol") == 0) 173 175 buf = websetvol(param, fmt); 174 if(ostrcmp(query, "setmute") == 0)176 else if(ostrcmp(query, "setmute") == 0) 175 177 buf = websetmute(param, fmt); 176 if(ostrcmp(query, "getbouquet") == 0)178 else if(ostrcmp(query, "getbouquet") == 0) 177 179 buf = webgetbouquet(fmt); 178 if(ostrcmp(query, "getsat") == 0)180 else if(ostrcmp(query, "getsat") == 0) 179 181 buf = webgetsat(fmt); 180 if(ostrcmp(query, "getprovider") == 0)182 else if(ostrcmp(query, "getprovider") == 0) 181 183 buf = webgetprovider(fmt); 182 if(ostrcmp(query, "getaz") == 0)184 else if(ostrcmp(query, "getaz") == 0) 183 185 buf = webgetaz(fmt); 184 if(ostrcmp(query, "getconfig") == 0)186 else if(ostrcmp(query, "getconfig") == 0) 185 187 buf = webgetconfig(fmt); 186 if(ostrcmp(query, "getchannelpage") == 0)188 else if(ostrcmp(query, "getchannelpage") == 0) 187 189 buf = webgetchannelpage(param, fmt); 188 if(ostrcmp(query, "getallchannel") == 0)190 else if(ostrcmp(query, "getallchannel") == 0) 189 191 buf = webgetchannel(0, 0, 1, fmt); 190 if(ostrcmp(query, "getbouquetchannel") == 0)192 else if(ostrcmp(query, "getbouquetchannel") == 0) 191 193 buf = webgetbouquetchannel(param, fmt); 192 if(ostrcmp(query, "getsatchannel") == 0 && param != NULL)194 else if(ostrcmp(query, "getsatchannel") == 0 && param != NULL) 193 195 buf = webgetchannel(atoi(param), 1, 1, fmt); 194 if(ostrcmp(query, "getproviderchannel") == 0 && param != NULL)196 else if(ostrcmp(query, "getproviderchannel") == 0 && param != NULL) 195 197 buf = webgetchannel(atoi(param), 2, 1, fmt); 196 if(ostrcmp(query, "getazchannel") == 0 && param != NULL)198 else if(ostrcmp(query, "getazchannel") == 0 && param != NULL) 197 199 buf = webgetchannel(atoi(param), 3, 1, fmt); 198 if(ostrcmp(query, "switch") == 0)200 else if(ostrcmp(query, "switch") == 0) 199 201 buf = webswitch(param, fmt); 200 if(ostrcmp(query, "getaktservice") == 0)202 else if(ostrcmp(query, "getaktservice") == 0) 201 203 buf = webgetaktservice(fmt); 202 if(ostrcmp(query, "getservice") == 0)204 else if(ostrcmp(query, "getservice") == 0) 203 205 buf = webgetservice(param, fmt); 204 if(ostrcmp(query, "getepg") == 0)206 else if(ostrcmp(query, "getepg") == 0) 205 207 buf = webgetepg(param, fmt); 206 if(ostrcmp(query, "getmovieepg") == 0)208 else if(ostrcmp(query, "getmovieepg") == 0) 207 209 buf = webgetmovieepg(param, getconfig("rec_streampath", NULL), 1, fmt); 208 if(ostrcmp(query, "getsingleepg") == 0)210 else if(ostrcmp(query, "getsingleepg") == 0) 209 211 buf = webgetsingleepg(param, fmt); 210 if(ostrcmp(query, "getgmultiepg") == 0)212 else if(ostrcmp(query, "getgmultiepg") == 0) 211 213 buf = webgetgmultiepg(param, fmt); 212 if(query != NULL && ostrstr(query, "getepgsearch") == query)214 else if(query != NULL && ostrstr(query, "getepgsearch") == query) 213 215 buf = webgetepgsearch(query, param, fmt); 214 if(ostrcmp(query, "getsignal") == 0)216 else if(ostrcmp(query, "getsignal") == 0) 215 217 buf = webgetsignal(fmt); 216 if(ostrcmp(query, "getmoviefilelist") == 0)218 else if(ostrcmp(query, "getmoviefilelist") == 0) 217 219 buf = webgetfilelist(param, "getmoviefilelist", "delmoviefile", getconfig("rec_streampath", NULL), "*.avi *.dat *.divx *.flv *.mkv *.m4v *.mp4 *.mov *.mpg *.mpeg *.mts *.m2ts *.trp *.ts *.vdr *.vob *.wmv *.rm", 31, fmt); 218 if(ostrcmp(query, "delmoviefile") == 0)220 else if(ostrcmp(query, "delmoviefile") == 0) 219 221 buf = webdelfile(param, "getmoviefilelist", "delmoviefile", getconfig("rec_streampath", NULL), "*.avi *.dat *.divx *.flv *.mkv *.m4v *.mp4 *.mov *.mpg *.mpeg *.mts *.m2ts *.trp *.ts *.vdr *.vob *.wmv *.rm", 31, fmt); 220 if(ostrcmp(query, "getm3u") == 0)222 else if(ostrcmp(query, "getm3u") == 0) 221 223 { 222 224 buf = webgetm3u(param, *connfd, fmt); … … 227 229 } 228 230 } 229 if(ostrcmp(query, "getvideo") == 0)231 else if(ostrcmp(query, "getvideo") == 0) 230 232 buf = webgetvideo(param, *connfd, fmt); 231 if(ostrcmp(query, "videoplay") == 0 || ostrcmp(query, "videoplay=") == 0)233 else if(ostrcmp(query, "videoplay") == 0 || ostrcmp(query, "videoplay=") == 0) 232 234 buf = webvideo(param, fmt); 233 if(ostrcmp(query, "getshoot") == 0)235 else if(ostrcmp(query, "getshoot") == 0) 234 236 { 235 237 webgetshoot(param, fmt); … … 243 245 buf = ostrcat("shoot.html", NULL, 0, 0); 244 246 } 245 if(query != NULL && ostrstr(query, "poweroff") == query)247 else if(query != NULL && ostrstr(query, "poweroff") == query) 246 248 oshutdown(1, 1); 247 if(query != NULL && ostrstr(query, "restart") == query)249 else if(query != NULL && ostrstr(query, "restart") == query) 248 250 oshutdown(2, 1); 249 if(query != NULL && ostrstr(query, "guirestart") == query)251 else if(query != NULL && ostrstr(query, "guirestart") == query) 250 252 oshutdown(3, 1); 251 if(query != NULL && ostrstr(query, "standby") == query)253 else if(query != NULL && ostrstr(query, "standby") == query) 252 254 { 253 255 status.standby = 2; 254 256 addtimer(&screenstandby, START, 1000, 1, NULL, NULL, NULL); 255 257 } 256 if(query != NULL && ostrstr(query, "boxstatus") == query)258 else if(query != NULL && ostrstr(query, "boxstatus") == query) 257 259 { 258 260 if(status.standby > 0) … … 271 273 } 272 274 } 273 if(query != NULL && ostrstr(query, "mutestatus") == query)275 else if(query != NULL && ostrstr(query, "mutestatus") == query) 274 276 { 275 277 if(status.mute > 0) … … 288 290 } 289 291 } 290 if(query != NULL && ostrstr(query, "message") == query)292 else if(query != NULL && ostrstr(query, "message") == query) 291 293 buf = websendmessage(query, fmt); 292 294 -
titan/titan/httpdfunc.h
r20479 r20480 2928 2928 } 2929 2929 2930 char* webgetchannellock(char* param, int fmt) 2931 { 2932 char* buf = NULL, *param1 = NULL; 2933 struct channel* chnode = NULL; 2934 2935 if(param == NULL) return NULL; 2936 2937 //create param1 2938 param1 = strchr(param, '&'); 2939 if(param1 != NULL) 2940 *param1++ = '\0'; 2941 2942 if(param1 == NULL) return NULL; 2943 2944 chnode = getchannel(atoi(param), strtoull(param1, NULL, 10)); 2945 if(chnode != NULL) 2946 { 2947 buf = ostrcat(buf, chnode->name, 1, 0); 2948 buf = ostrcat(buf, "#", 1, 0); 2949 buf = ostrcat(buf, atoi(chnode->serviceid), 1, 1); 2950 buf = ostrcat(buf, "#", 1, 0); 2951 buf = ostrcat(buf, strtoull(chnode->transponderid, NULL, 10), 1, 1); 2952 buf = ostrcat(buf, "#", 1, 0); 2953 2954 if(channelnottunable(chnode) == 1) 2955 buf = ostrcat(buf, "1", 1, 0); 2956 else 2957 buf = ostrcat(buf, "0", 1, 0); 2958 } 2959 else 2960 buf = ostrcat("no data", NULL, 0, 0); 2961 2962 return buf; 2963 } 2964 2930 2965 #endif
Note: See TracChangeset
for help on using the changeset viewer.