| 1 | /**************************************************************************** |
|---|
| 2 | * NAME: App_Fnc_RRT.c |
|---|
| 3 | *---------------------------------------------------------------------------- |
|---|
| 4 | * Copyright (c) DIGITAL STREAM Technology Inc. |
|---|
| 5 | *---------------------------------------------------------------------------- |
|---|
| 6 | * CREATED_BY: Do Gon Lee |
|---|
| 7 | * CREATION_DATE: 2009/08/25 |
|---|
| 8 | * $Author: foxhunt $ |
|---|
| 9 | * $Revision: 1.0 $ |
|---|
| 10 | * $Date: 2009/08/25 19:28:34 $ |
|---|
| 11 | *---------------------------------------------------------------------------- |
|---|
| 12 | * PURPOSE: |
|---|
| 13 | * - |
|---|
| 14 | *****************************************************************************/ |
|---|
| 15 | |
|---|
| 16 | /*_____ I N C L U D E __________________________________________*/ |
|---|
| 17 | |
|---|
| 18 | #include "App_Main.h" |
|---|
| 19 | |
|---|
| 20 | #if SUPPORT_RRT |
|---|
| 21 | |
|---|
| 22 | #include "App_Fnc_Common.h" |
|---|
| 23 | |
|---|
| 24 | #include "DMW_EpgRating.h" |
|---|
| 25 | |
|---|
| 26 | #include "App_Fnc_RRT.h" |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | /*_____ D E F I N I T I O N ____________________________________*/ |
|---|
| 32 | |
|---|
| 33 | #if COMMENT |
|---|
| 34 | ____DbgPrint____(){} |
|---|
| 35 | #endif |
|---|
| 36 | |
|---|
| 37 | DHL_MODULE("@f_rrt", 0); |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | #if COMMENT |
|---|
| 44 | ____Config____(){} |
|---|
| 45 | #endif |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | #if COMMENT |
|---|
| 52 | ____Types____(){} |
|---|
| 53 | #endif |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | #if COMMENT |
|---|
| 60 | ____Variables____(){} |
|---|
| 61 | #endif |
|---|
| 62 | |
|---|
| 63 | BOOL g_App_SupportDRRT = 1; /* 1À̸é DRRT (region 5 downloadble RRT)¸¦ »ç¿ëÇÑ´Ù. */ |
|---|
| 64 | |
|---|
| 65 | BOOL g_App_RrtInited=FALSE; |
|---|
| 66 | |
|---|
| 67 | extern STATUS NvRamSync(UINT32, void *); |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | /*_____ F U N C T I O N ________________________________________*/ |
|---|
| 74 | |
|---|
| 75 | #if 0 |
|---|
| 76 | ____APIs____() |
|---|
| 77 | #endif |
|---|
| 78 | |
|---|
| 79 | void AppRrt_UseDRRT(BOOL bUse) |
|---|
| 80 | { |
|---|
| 81 | if(!g_App_RrtInited) return; |
|---|
| 82 | |
|---|
| 83 | g_App_SupportDRRT = bUse ? 1 : 0; |
|---|
| 84 | |
|---|
| 85 | dprint(1, "[RRT] Support DRRT mode %d (%s)\n", |
|---|
| 86 | (int)g_App_SupportDRRT, |
|---|
| 87 | g_App_SupportDRRT ? "downloadable" : "fixed"); |
|---|
| 88 | } |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | #if 0 |
|---|
| 95 | ____NvRam_IO_____() |
|---|
| 96 | #endif |
|---|
| 97 | |
|---|
| 98 | /****************************************************************************************** |
|---|
| 99 | FUNCTION: |
|---|
| 100 | - AppRrt_ResetRrtDB |
|---|
| 101 | |
|---|
| 102 | Purpose: |
|---|
| 103 | - reset rrt db |
|---|
| 104 | ******************************************************************************************/ |
|---|
| 105 | void AppRrt_ResetRrtDB(BOOL bSync) |
|---|
| 106 | { |
|---|
| 107 | STATUS status; |
|---|
| 108 | UINT8 buf[4] = {0, }; |
|---|
| 109 | |
|---|
| 110 | if(!g_App_RrtInited) return; |
|---|
| 111 | |
|---|
| 112 | dprint(1, "Clear NvRam RRT info..\n"); |
|---|
| 113 | |
|---|
| 114 | status = DMW_CDB_WriteRawDB2(OFFSET_RRT_DB, buf, sizeof(buf)); |
|---|
| 115 | if(status) |
|---|
| 116 | dprint(1, "!! Fail to reset RRTDB!! err %d\n", status); |
|---|
| 117 | |
|---|
| 118 | if (bSync) { |
|---|
| 119 | //status = NvRamSync(OFFSET_RRT_DB, NULL); |
|---|
| 120 | App_NVM_Sync(); |
|---|
| 121 | |
|---|
| 122 | if(status) |
|---|
| 123 | dprint(1, "!! Fail NvRamSync err %d\n", status); |
|---|
| 124 | } |
|---|
| 125 | } |
|---|
| 126 | |
|---|
| 127 | |
|---|
| 128 | /****************************************************************************************** |
|---|
| 129 | FUNCTION: |
|---|
| 130 | - AppRrt_SaveRrt |
|---|
| 131 | |
|---|
| 132 | Purpose: |
|---|
| 133 | - |
|---|
| 134 | ******************************************************************************************/ |
|---|
| 135 | /* cafrii 060609, remove arguments. |
|---|
| 136 | ¾îÂ¥ÇÇ rrt°¡ ¼ö½ÅµÈ ÀÌÈÄ¿¡ ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÒ °ÍÀ̹ǷΠ|
|---|
| 137 | Epg MW API¸¦ ÀÌ¿ëÇØ RRT¸¦ °¡Á®¿Ã ¼ö ÀÖ´Ù. */ |
|---|
| 138 | /* void AppRrt_SaveRrt(rrtSectionPtr_t rrt) */ |
|---|
| 139 | void AppRrt_SaveRrt(void) |
|---|
| 140 | { |
|---|
| 141 | rrtSectionPtr_t rrt; |
|---|
| 142 | UINT8 *flat_rrt; |
|---|
| 143 | int size; |
|---|
| 144 | STATUS status; |
|---|
| 145 | |
|---|
| 146 | if(!g_App_RrtInited) return; |
|---|
| 147 | |
|---|
| 148 | dprint(1, "AppRrt_SaveRrt\n"); |
|---|
| 149 | |
|---|
| 150 | if (g_App_SupportDRRT == 0) { |
|---|
| 151 | dprint(1, "!! DRRT not support\n"); |
|---|
| 152 | return; |
|---|
| 153 | } |
|---|
| 154 | |
|---|
| 155 | Dmc_EpgLockRrtDB(TRUE, TRUE); /* cafrii 060719, CoreDB->RrtDB */ |
|---|
| 156 | |
|---|
| 157 | rrt = Dmc_EpgGetCurrentRrt(); |
|---|
| 158 | |
|---|
| 159 | size = MAX_SIZE_RRT_DB; |
|---|
| 160 | |
|---|
| 161 | flat_rrt = DHL_OS_Malloc(size); |
|---|
| 162 | if (flat_rrt == NULL) { |
|---|
| 163 | dprint(1, "!! out of memory for rrt db (size %d)\n", size); |
|---|
| 164 | goto label_exit; |
|---|
| 165 | } |
|---|
| 166 | |
|---|
| 167 | status = Dmc_FlattenRrtSection(rrt, (UINT32 *)&size, flat_rrt); |
|---|
| 168 | if (status) |
|---|
| 169 | goto label_exit; |
|---|
| 170 | |
|---|
| 171 | status = DMW_CDB_WriteRawDB2(OFFSET_RRT_DB, flat_rrt, size); |
|---|
| 172 | if(status) |
|---|
| 173 | dprint(1, "!! Fail to reset RRTDB err %d\n", status); |
|---|
| 174 | |
|---|
| 175 | label_exit: |
|---|
| 176 | |
|---|
| 177 | Dmc_EpgLockRrtDB(FALSE, TRUE); /* cafrii 060719, CoreDB->RrtDB */ |
|---|
| 178 | |
|---|
| 179 | // sync¸¦ ÇÒ °ÍÀÎÁö, trigger¸¦ ÇÒ °ÍÀÎÁö´Â µ¥ÀÌÅÍÀÇ ³»¿ë¿¡ µû¶ó ´Ù¸§. |
|---|
| 180 | // rrtÀÇ °æ¿ì ¹Ù·Î sync¸¦ ÇÑ´Ù. |
|---|
| 181 | status = App_NVM_Sync(); |
|---|
| 182 | |
|---|
| 183 | if(status) |
|---|
| 184 | dprint(1, "!! Fail NvRamSync err %d\n", status); |
|---|
| 185 | |
|---|
| 186 | DHL_OS_Free((void **)&flat_rrt); |
|---|
| 187 | } |
|---|
| 188 | |
|---|
| 189 | |
|---|
| 190 | /****************************************************************************************** |
|---|
| 191 | FUNCTION: |
|---|
| 192 | - AppRrt_LoadRrt |
|---|
| 193 | |
|---|
| 194 | Purpose: |
|---|
| 195 | - |
|---|
| 196 | ******************************************************************************************/ |
|---|
| 197 | void AppRrt_LoadRrt() |
|---|
| 198 | { |
|---|
| 199 | UINT8 *flat_rrt; |
|---|
| 200 | int size; |
|---|
| 201 | STATUS status; |
|---|
| 202 | rrtSectionPtr_t rrt; |
|---|
| 203 | |
|---|
| 204 | if(!g_App_RrtInited) return; |
|---|
| 205 | |
|---|
| 206 | dprint(1, "AppRrt_LoadRrt\n"); |
|---|
| 207 | |
|---|
| 208 | if (g_App_SupportDRRT == 0) { /* cafrii 060320 add */ |
|---|
| 209 | dprint(1, "!! DRRT not support\n"); |
|---|
| 210 | return; |
|---|
| 211 | } |
|---|
| 212 | |
|---|
| 213 | size = MAX_SIZE_RRT_DB; |
|---|
| 214 | |
|---|
| 215 | flat_rrt = DHL_OS_Malloc(size); |
|---|
| 216 | |
|---|
| 217 | if (flat_rrt == NULL) { |
|---|
| 218 | dprint(1, "!! out of memory for flat rrt\n"); |
|---|
| 219 | return; |
|---|
| 220 | } |
|---|
| 221 | |
|---|
| 222 | status = DMW_CDB_ReadRawDB2(OFFSET_RRT_DB, flat_rrt, size); |
|---|
| 223 | |
|---|
| 224 | if (flat_rrt[0] == 0x00 || flat_rrt[0] == 0xff) { |
|---|
| 225 | dprint(1, "!! Empty RRT DB\n"); |
|---|
| 226 | DHL_OS_Free((void **)&flat_rrt); |
|---|
| 227 | return; |
|---|
| 228 | } |
|---|
| 229 | |
|---|
| 230 | status = Dmc_RestoreRrtSection(&rrt, flat_rrt); |
|---|
| 231 | if (status) { |
|---|
| 232 | dprint(1, "!! Saved RRT invalid. cannot restore.. err %d\n", status); |
|---|
| 233 | } |
|---|
| 234 | else { |
|---|
| 235 | Dmc_EpgSetCurrentRrt(rrt); |
|---|
| 236 | } |
|---|
| 237 | |
|---|
| 238 | DHL_OS_Free((void **)&flat_rrt); |
|---|
| 239 | } |
|---|
| 240 | |
|---|
| 241 | |
|---|
| 242 | /****************************************************************************************** |
|---|
| 243 | FUNCTION: |
|---|
| 244 | - AppRrt_PrintRrt |
|---|
| 245 | |
|---|
| 246 | Purpose: |
|---|
| 247 | - |
|---|
| 248 | ******************************************************************************************/ |
|---|
| 249 | void AppRrt_PrintRrt(BOOL bDetail) |
|---|
| 250 | { |
|---|
| 251 | rrtSectionPtr_t rrt; |
|---|
| 252 | BOOL bOK; |
|---|
| 253 | |
|---|
| 254 | if(!g_App_RrtInited) return; |
|---|
| 255 | |
|---|
| 256 | bOK = Dmc_EpgLockRrtDB(TRUE, FALSE); |
|---|
| 257 | if (bOK) { |
|---|
| 258 | rrt = Dmc_EpgGetCurrentRrt(); |
|---|
| 259 | if (rrt) |
|---|
| 260 | Dmc_PrintRrt(rrt, 4, bDetail); /* indent 4 */ |
|---|
| 261 | Dmc_EpgLockRrtDB(FALSE, FALSE); |
|---|
| 262 | } |
|---|
| 263 | else |
|---|
| 264 | dprint(1, "RRT mutex busy\n"); |
|---|
| 265 | } |
|---|
| 266 | |
|---|
| 267 | |
|---|
| 268 | /****************************************************************************************** |
|---|
| 269 | FUNCTION: |
|---|
| 270 | - AppRrt_ChangeRrtOption |
|---|
| 271 | |
|---|
| 272 | Purpose: |
|---|
| 273 | - |
|---|
| 274 | ******************************************************************************************/ |
|---|
| 275 | BOOL AppRrt_ChangeRrtOption(int dim, int value, EPG_RRT_BLOCK_OPTION action, BOOL bSaveNvRam) |
|---|
| 276 | { |
|---|
| 277 | BOOL bChanged = FALSE; |
|---|
| 278 | |
|---|
| 279 | if(!g_App_RrtInited) return FALSE; |
|---|
| 280 | |
|---|
| 281 | bChanged = Dmc_EpgSetRrtOption(dim, value, action); |
|---|
| 282 | |
|---|
| 283 | if (bChanged == FALSE) { |
|---|
| 284 | dprint(1, "RRT option not changed\n"); |
|---|
| 285 | } |
|---|
| 286 | else { |
|---|
| 287 | dprint(1, "RRT option changed.\n"); |
|---|
| 288 | /* AppRrt_PrintRrt(FALSE); */ |
|---|
| 289 | |
|---|
| 290 | if (bSaveNvRam) |
|---|
| 291 | AppRrt_SaveRrt(); |
|---|
| 292 | |
|---|
| 293 | AppRating_CheckRatingBlock(0); |
|---|
| 294 | } |
|---|
| 295 | return bChanged; |
|---|
| 296 | } |
|---|
| 297 | |
|---|
| 298 | |
|---|
| 299 | /****************************************************************************************** |
|---|
| 300 | FUNCTION: |
|---|
| 301 | - rrt_help |
|---|
| 302 | |
|---|
| 303 | Purpose: |
|---|
| 304 | - rrt help function |
|---|
| 305 | ******************************************************************************************/ |
|---|
| 306 | static void rrt_help(void) |
|---|
| 307 | { |
|---|
| 308 | DHL_OS_Printf("\trrt_init: reset nvram rrt storage\n"); |
|---|
| 309 | DHL_OS_Printf("\trrt_load: load rrt from nvram\n"); |
|---|
| 310 | DHL_OS_Printf("\trrt_save: save rrt to nvram\n"); |
|---|
| 311 | DHL_OS_Printf("\trrt_option [dim] [val] [on/off]: change rrt user block option\n"); |
|---|
| 312 | DHL_OS_Printf("\trrt_show [1:detail]: display current rrt\n"); |
|---|
| 313 | } |
|---|
| 314 | |
|---|
| 315 | |
|---|
| 316 | |
|---|
| 317 | |
|---|
| 318 | |
|---|
| 319 | #if 0 |
|---|
| 320 | ____iskang_Input__(){} |
|---|
| 321 | #endif |
|---|
| 322 | |
|---|
| 323 | void AppRrt_SaveCopiedRrtSection(rrtSectionPtr_t rrt) |
|---|
| 324 | { |
|---|
| 325 | if(!g_App_RrtInited) return; |
|---|
| 326 | |
|---|
| 327 | Dmc_EpgSetCurrentRrt(rrt); |
|---|
| 328 | /* Dmc_FreeAtscTable(&rrt); */ |
|---|
| 329 | } |
|---|
| 330 | |
|---|
| 331 | |
|---|
| 332 | rrtSectionPtr_t AppRrt_GetRrt() |
|---|
| 333 | { |
|---|
| 334 | |
|---|
| 335 | UINT8 *flat_rrt; |
|---|
| 336 | int size; |
|---|
| 337 | STATUS status; |
|---|
| 338 | rrtSectionPtr_t rrt = NULL; |
|---|
| 339 | |
|---|
| 340 | dprint(1, "AppRrt_LoadRrt\n"); |
|---|
| 341 | |
|---|
| 342 | if(!g_App_RrtInited) return; |
|---|
| 343 | |
|---|
| 344 | if (g_App_SupportDRRT == 0) { /* cafrii 060320 add */ |
|---|
| 345 | dprint(1, "!! DRRT not support\n"); |
|---|
| 346 | return NULL; |
|---|
| 347 | } |
|---|
| 348 | |
|---|
| 349 | size = MAX_SIZE_RRT_DB; |
|---|
| 350 | |
|---|
| 351 | flat_rrt = DHL_OS_Malloc(size); |
|---|
| 352 | |
|---|
| 353 | if (flat_rrt == NULL) { |
|---|
| 354 | dprint(1, "!! out of memory for flat rrt\n"); |
|---|
| 355 | return NULL; |
|---|
| 356 | } |
|---|
| 357 | |
|---|
| 358 | status = DMW_CDB_ReadRawDB2(OFFSET_RRT_DB, flat_rrt, size); |
|---|
| 359 | |
|---|
| 360 | if (flat_rrt[0] == 0x00 || flat_rrt[0] == 0xff) { |
|---|
| 361 | dprint(1, "!! Empty RRT DB\n"); |
|---|
| 362 | DHL_OS_Free((void **)&flat_rrt); |
|---|
| 363 | return NULL; |
|---|
| 364 | } |
|---|
| 365 | |
|---|
| 366 | status = Dmc_RestoreRrtSection(&rrt, flat_rrt); |
|---|
| 367 | |
|---|
| 368 | if (status) { |
|---|
| 369 | dprint(1, "!! Saved RRT invalid. cannot restore.. err %d\n", status); |
|---|
| 370 | } |
|---|
| 371 | /* |
|---|
| 372 | else { |
|---|
| 373 | Dmc_EpgSetCurrentRrt(rrt); |
|---|
| 374 | } |
|---|
| 375 | */ |
|---|
| 376 | DHL_OS_Free((void **)&flat_rrt); |
|---|
| 377 | if(status) |
|---|
| 378 | return NULL; |
|---|
| 379 | |
|---|
| 380 | else |
|---|
| 381 | return rrt; |
|---|
| 382 | } |
|---|
| 383 | |
|---|
| 384 | |
|---|
| 385 | /**************************************************************************** |
|---|
| 386 | * DMW_EpgBase.c¿¡¼ |
|---|
| 387 | * Dmc_EpgSetRrtOption ÀÇ ¿øÇüÀ» °¡Á®¿Í º¯ÇüÇÏ¿´´Ù. |
|---|
| 388 | * »ç¿ëÀÚ°¡ RRT Menu¸¦ ÀÌ¿ëÇØ¼ block optionÀÌ º¯°æµÈ °æ¿ì Àû¿ëÇÑ´Ù. |
|---|
| 389 | * ¿©±â¼ valueÀÇ index´Â first empty value°¡ Á¦°ÅµÈ »óÅÂÀÏ °æ¿ì |
|---|
| 390 | * Á¦°ÅµÈ »óÅ¿¡¼ÀÇ indexÀÌ´Ù. |
|---|
| 391 | * Áï first non-empty valueÀÇ index°¡ 0ÀÌ µÈ´Ù. |
|---|
| 392 | ****************************************************************************/ |
|---|
| 393 | BOOL AppRrt_ChangeCopiedRrtOption(rrtSectionPtr_t rrt, int idim, int ivalue |
|---|
| 394 | , EPG_RRT_BLOCK_OPTION action) |
|---|
| 395 | { |
|---|
| 396 | int k; |
|---|
| 397 | /* rrtSectionPtr_t rrt; */ |
|---|
| 398 | rrtDimensionPtr_t dim; |
|---|
| 399 | BOOL bChanged = FALSE; |
|---|
| 400 | BOOL bSet; |
|---|
| 401 | |
|---|
| 402 | if(!g_App_RrtInited) return FALSE; |
|---|
| 403 | |
|---|
| 404 | if (action != RRT_OPTION_UNBLOCK && |
|---|
| 405 | action != RRT_OPTION_BLOCK && |
|---|
| 406 | action != RRT_OPTION_TOGGLE) { |
|---|
| 407 | DHL_OS_Printf("\n AppRrt_ChangeCopiedRrtOption::!! invalid action %d\n\n", action); |
|---|
| 408 | goto label_exit; |
|---|
| 409 | } |
|---|
| 410 | |
|---|
| 411 | /* Dmc_EpgLockRrtDB(TRUE, TRUE); // cafrii 060718 change to RRT mutex */ |
|---|
| 412 | |
|---|
| 413 | /* rrt = g_EpgRrt; */ |
|---|
| 414 | |
|---|
| 415 | if (rrt == NULL) { |
|---|
| 416 | DHL_OS_Printf("\n AppRrt_ChangeCopiedRrtOption::!! currently no RRT\n"); |
|---|
| 417 | goto label_exit; |
|---|
| 418 | } |
|---|
| 419 | |
|---|
| 420 | if (idim < 0 || idim > rrt->dimensions_defined-1) { |
|---|
| 421 | DHL_OS_Printf("\n AppRrt_ChangeCopiedRrtOption::!! dim_idx %d invalid (should be 0 ~ %d)\n", idim, rrt->dimensions_defined-1); |
|---|
| 422 | goto label_exit; |
|---|
| 423 | } |
|---|
| 424 | |
|---|
| 425 | dim = &rrt->dimension[idim]; |
|---|
| 426 | |
|---|
| 427 | if (ivalue < 0 || ivalue > dim->values_defined-1) { |
|---|
| 428 | DHL_OS_Printf("\n AppRrt_ChangeCopiedRrtOption::!! val_idx %d invalid (should be 0 ~ %d)\n", |
|---|
| 429 | ivalue, dim->values_defined-1); |
|---|
| 430 | goto label_exit; |
|---|
| 431 | } |
|---|
| 432 | |
|---|
| 433 | /* todo |
|---|
| 434 | º¯°æ»çÇ×ÀÌ ¾øÀ¸¸é ±× »ç½ÇÀ» Å뺸.. */ |
|---|
| 435 | |
|---|
| 436 | if (action == RRT_OPTION_TOGGLE) |
|---|
| 437 | bSet = dim->value[ivalue].block_on ? 0 : 1; /* toggle.. */ |
|---|
| 438 | else |
|---|
| 439 | bSet = (action == RRT_OPTION_BLOCK) ? 1 : 0; |
|---|
| 440 | |
|---|
| 441 | if (dim->value[ivalue].block_on != bSet) { |
|---|
| 442 | dim->value[ivalue].block_on = bSet; |
|---|
| 443 | bChanged = TRUE; |
|---|
| 444 | } |
|---|
| 445 | |
|---|
| 446 | if (dim->graduated_scale && bSet) { |
|---|
| 447 | /* grad scaleÀÎ °æ¿ì ÀÌ value ÀÌÈÄÀÇ itemÀº ¸ðµÎ block.. */ |
|---|
| 448 | for (k=ivalue; k<dim->values_defined; k++) { |
|---|
| 449 | if (dim->value[k].block_on == 0) { |
|---|
| 450 | dim->value[k].block_on = 1; |
|---|
| 451 | bChanged = TRUE; |
|---|
| 452 | } |
|---|
| 453 | } |
|---|
| 454 | } |
|---|
| 455 | else if (dim->graduated_scale && !bSet) { |
|---|
| 456 | /* grad scaleÀÎ °æ¿ì ÀÌ value ÀÌÀüÀÇ itemÀº ¸ðµÎ unblock.. |
|---|
| 457 | value 0´Â »ç¿ëÇÏÁö ¾Ê´Â °ÍÀ̱⠶§¹®¿¡ setÇØµµ ±×¸¸ ¾ÈÇØµµ ±×¸¸.. */ |
|---|
| 458 | for (k=0; k<=ivalue; k++) { |
|---|
| 459 | if (dim->value[k].block_on) { |
|---|
| 460 | dim->value[k].block_on = 0; |
|---|
| 461 | bChanged = TRUE; |
|---|
| 462 | } |
|---|
| 463 | } |
|---|
| 464 | } |
|---|
| 465 | |
|---|
| 466 | /* if (DBGLVL(2)) */ |
|---|
| 467 | Dmc_PrintRrt(rrt, 4, 0); |
|---|
| 468 | |
|---|
| 469 | label_exit: |
|---|
| 470 | /* Dmc_EpgLockRrtDB(FALSE, TRUE); // cafrii 060718 change to RRT Mutex */ |
|---|
| 471 | |
|---|
| 472 | /* ¸¸¾à º¯°æµÈ »çÇ×ÀÌ ¾ø´Ù¸é Rating check¸¦ ´Ù½Ã ÇÒ ÇÊ¿ä´Â ¾ø´Ù. */ |
|---|
| 473 | return bChanged; |
|---|
| 474 | } |
|---|
| 475 | |
|---|
| 476 | |
|---|
| 477 | |
|---|
| 478 | |
|---|
| 479 | |
|---|
| 480 | #if COMMENT |
|---|
| 481 | ____Init____(){} |
|---|
| 482 | #endif |
|---|
| 483 | |
|---|
| 484 | /****************************************************************************************** |
|---|
| 485 | FUNCTION: |
|---|
| 486 | - AppRrt_Init |
|---|
| 487 | |
|---|
| 488 | Purpose: |
|---|
| 489 | - rrt initialize function |
|---|
| 490 | ******************************************************************************************/ |
|---|
| 491 | void AppRrt_Init() |
|---|
| 492 | { |
|---|
| 493 | if(g_App_RrtInited) return; |
|---|
| 494 | |
|---|
| 495 | DHL_DBG_RegisterFunctionSymbol("rrt_init", (void *)AppRrt_ResetRrtDB); |
|---|
| 496 | DHL_DBG_RegisterFunctionSymbol("rrt_load", (void *)AppRrt_LoadRrt); |
|---|
| 497 | DHL_DBG_RegisterFunctionSymbol("rrt_save", (void *)AppRrt_SaveRrt); |
|---|
| 498 | |
|---|
| 499 | DHL_DBG_RegisterFunctionSymbol("rrt_option", (void *)AppRrt_ChangeRrtOption); |
|---|
| 500 | DHL_DBG_RegisterFunctionSymbol("rrt_show", (void *)AppRrt_PrintRrt); |
|---|
| 501 | |
|---|
| 502 | DHL_DBG_RegisterFunctionSymbol("rrt_help", (void *)rrt_help); |
|---|
| 503 | |
|---|
| 504 | g_App_RrtInited=TRUE; |
|---|
| 505 | |
|---|
| 506 | AppRrt_LoadRrt(); |
|---|
| 507 | } |
|---|
| 508 | |
|---|
| 509 | |
|---|
| 510 | void Test_Rrt() |
|---|
| 511 | { |
|---|
| 512 | rrtSectionPtr_t rrt; |
|---|
| 513 | int idim,ivalue; |
|---|
| 514 | |
|---|
| 515 | idim = 0; |
|---|
| 516 | ivalue =1; |
|---|
| 517 | |
|---|
| 518 | Dmc_EpgLockRrtDB(TRUE, TRUE); /* cafrii 060718 change to RRT mutex */ |
|---|
| 519 | |
|---|
| 520 | rrt = AppRrt_GetRrt(); |
|---|
| 521 | |
|---|
| 522 | AppRrt_ChangeCopiedRrtOption(rrt,idim,ivalue,RRT_OPTION_TOGGLE); |
|---|
| 523 | |
|---|
| 524 | AppRrt_SaveCopiedRrtSection(rrt); |
|---|
| 525 | |
|---|
| 526 | Dmc_EpgLockRrtDB(FALSE, TRUE); |
|---|
| 527 | } |
|---|
| 528 | |
|---|
| 529 | |
|---|
| 530 | #endif /* SUPPORT_RRT */ |
|---|
| 531 | |
|---|
| 532 | |
|---|
| 533 | /* end of file */ |
|---|