00001 #include <stdio.h>
00002 #include <string.h>
00003 #include <unistd.h>
00004 #include <signal.h>
00005 #include <sys/types.h>
00006 #include <sys/socket.h>
00007 #include <netinet/in.h>
00008 #include <pthread.h>
00009 #include <stdlib.h>
00010
00011 #include "npapi.h"
00012 #include "npupp.h"
00013
00014 #include <X11/Xlib.h>
00015 #include <X11/Intrinsic.h>
00016 #include <X11/StringDefs.h>
00017 #include <X11/X.h>
00018 #include <semaphore.h>
00019 #include <errno.h>
00020 #include <string.h>
00021
00022 #define MASK_MPLAYER 1
00023 #define MASK_RIOCLIENT 2
00024 #define MASK_TGIF 4
00025 #define MASK_INDEX 8
00026
00027 #define MAX_PLUGINS 16
00028 #define PLUGINS_MASK ( ( 1 << 16 ) - 1 )
00029
00030 typedef struct _PluginInstance
00031 {
00032 NPWindow *fWindow;
00033 uint16 fMode;
00034 uint16 mask;
00035 pid_t pid;
00036 Window window;
00037 Display *display;
00038 uint32 x, y;
00039 uint32 width, height;
00040 } PluginInstance;
00041
00042 typedef struct _ThreadParam
00043 {
00044 NPP instance;
00045 int soc;
00046 } ThreadParam;
00047
00048 int mID = 0, rID = 0, tID = 0, iID;
00049 int MaskComplete = 0;
00050 int CurMask;
00051 char server[ 128 ];
00052 char media[ 254 ];
00053 char SlideUrl[ 255 ];
00054 sem_t ChangeSlideSemaphore;
00055 int UseChangeSlide;
00056
00057 void ChangeSlide( void *param )
00058 {
00059 NPP instance;
00060 NPError Error;
00061 int error;
00062
00063 #ifdef RIO_DEBUG1
00064 fprintf( stderr, "[RioBrowserPlugin - ChangeSlide] Start\n" );
00065 #endif
00066
00067 instance = ( NPP ) param;
00068
00069
00070 Error = NPN_GetURL( instance, SlideUrl, "slide" );
00071
00072 if( Error != NPERR_NO_ERROR )
00073 {
00074
00075 NPN_Status( instance, "Error loading slide." );
00076 }
00077
00078
00079
00080 if( sem_post( &ChangeSlideSemaphore ) < 0 )
00081 {
00082 error = errno;
00083 fprintf( stderr, "[cederj]: sem_post failed with error %d (%s)\n",
00084 error, strerror( error ) );
00085 }
00086
00087 #ifdef RIO_DEBUG1
00088 fprintf( stderr, "[RioBrowserPlugin - ChangeSlide] Finish\n" );
00089 #endif
00090 }
00091
00092 void *listenerThread( void *param )
00093 {
00094 int END;
00095 int byread;
00096 int error;
00097 char pkt[ 255 ];
00098 ThreadParam *p;
00099 NPError Error;
00100
00101 #ifdef RIO_DEBUG1
00102 fprintf( stderr, "[RioBrowserPlugin - listenerThread] Start\n" );
00103 #endif
00104
00105 END = 0;
00106 p = ( ThreadParam * ) param;
00107 do
00108 {
00109 byread = recvfrom( p->soc, pkt, 254, 0, NULL, 0 );
00110 if( byread > 0 )
00111 {
00112 if( strncmp( pkt, "quit", 4 ) == 0 )
00113 END = 1;
00114 if( strncmp( pkt, "chgu", 4 ) == 0 )
00115 {
00116 if( UseChangeSlide )
00117 {
00118 #ifdef RIO_DEBUG2
00119 fprintf( stderr, "listenerThread: Usando a funcao " );
00120 fprintf( stderr, "NPN_PluginThreadAsyncCall\n" );
00121 #endif
00122
00123 strcpy( SlideUrl, &pkt[ 5 ] );
00124
00125
00126
00127
00128 NPN_PluginThreadAsyncCall( p->instance, ChangeSlide,
00129 ( void * ) p->instance );
00130
00131
00132 if( sem_wait( &ChangeSlideSemaphore ) < 0 )
00133 {
00134 error = errno;
00135 fprintf( stderr, "[cederj]: sem_wait failed with " );
00136 fprintf( stderr, "error %d (%s)\n", error,
00137 strerror( error ) );
00138 }
00139 }
00140 else
00141 {
00142 #ifdef RIO_DEBUG2
00143 fprintf( stderr, "listenerThread: Usando a funcao " );
00144 fprintf( stderr, "NPN_GetURL como antes\n" );
00145 #endif
00146 Error = NPN_GetURL( p->instance, &pkt[ 5 ], "slide" );
00147 if( Error != NPERR_NO_ERROR )
00148 {
00149
00150
00151 NPN_Status( p->instance,
00152 "Error loading slide. Upgrade your browser" );
00153 }
00154 }
00155 }
00156 }
00157 }
00158 while( !END );
00159
00160 NPN_MemFree( param );
00161
00162 #ifdef RIO_DEBUG1
00163 fprintf( stderr, "[RioBrowserPlugin - listenerThread] Finish\n" );
00164 #endif
00165
00166 return( NULL );
00167 }
00168
00169 static int startListenerThread( NPP instance )
00170 {
00171 int soc, port;
00172 unsigned int size_myaddr;
00173 pthread_t tid;
00174 struct sockaddr_in saddr, myaddr;
00175 ThreadParam *param;
00176
00177 #ifdef RIO_DEBUG1
00178 fprintf( stderr, "[RioBrowserPlugin - startListenerThread] Start\n" );
00179 #endif
00180
00181 port = 0;
00182 soc = socket( PF_INET, SOCK_DGRAM, 0 );
00183 saddr.sin_port = 0;
00184 saddr.sin_family = AF_INET;
00185 saddr.sin_addr.s_addr = INADDR_ANY;
00186 if( bind( soc, ( struct sockaddr * ) &saddr, sizeof( saddr ) ) == 0 )
00187 {
00188 param = NPN_MemAlloc( sizeof( ThreadParam ) );
00189 param->instance = instance;
00190 param->soc = soc;
00191 if( pthread_create( &tid, NULL, listenerThread, ( void * ) param )
00192 != 0 )
00193 {
00194 fprintf( stderr, "[cederj]: Could not create listener thread\n" );
00195 NPN_MemFree( param );
00196 }
00197 else
00198 {
00199 size_myaddr = sizeof( myaddr );
00200 getsockname( soc, ( struct sockaddr * ) &myaddr, &size_myaddr );
00201 port = myaddr.sin_port;
00202 }
00203 }
00204 else
00205 perror( "bind" );
00206
00207 #ifdef RIO_DEBUG1
00208 fprintf( stderr, "[RioBrowserPlugin - startListenerThread] Finish\n" );
00209 #endif
00210
00211 return port;
00212 }
00213
00214 static void startRioClient( PluginInstance *this, int port )
00215 {
00216 int argc;
00217 char *argv[ 20 ];
00218 char serverAndFile[ 255 ];
00219 char aux_str[ 16 ];
00220
00221 #ifdef RIO_DEBUG1
00222 fprintf( stderr, "[RioBrowserPlugin - startRioClient] Start\n" );
00223 #endif
00224
00225 signal( SIGCHLD, SIG_IGN );
00226
00227 if( ( this->pid = fork() ) != 0 )
00228 {
00229 if( this->pid < 0 )
00230 perror( "fork(). Failed to fork process." );
00231 }
00232 else
00233 {
00234 argc = 0;
00235 argv[ argc++ ] = strdup( "riommclient" );
00236 argv[ argc++ ] = strdup( "--usecache" );
00237 argv[ argc++ ] = strdup( "0" );
00238
00239
00240 argv[ argc++ ] = strdup( "--mainwindow" );
00241 sprintf( aux_str, "%d", rID );
00242 argv[ argc++ ] = strdup( aux_str );
00243
00244
00245 argv[ argc++ ] = strdup( "--vid" );
00246 sprintf( aux_str, "%d", mID );
00247 argv[ argc++ ] = strdup( aux_str );
00248
00249 if( tID )
00250 {
00251 argv[ argc++ ] = strdup( "--tgifWindow" );
00252 sprintf( aux_str, "%d", tID );
00253 argv[ argc++ ] = strdup( aux_str );
00254 }
00255
00256 if( port )
00257 {
00258 argv[ argc++ ] = strdup( "--pluginport" );
00259 sprintf( aux_str, "%d", port );
00260 argv[ argc++ ] = strdup( aux_str );
00261 }
00262
00263
00264 sprintf( serverAndFile, "%s:%s", server, media );
00265 argv[ argc++ ] = strdup( serverAndFile );
00266
00267 argv[ argc++ ] = NULL;
00268
00269 if( execvp( argv[ 0 ], argv ) < 0 )
00270 perror( "execlp(): Failed to execute riommclient" );
00271 }
00272
00273 #ifdef RIO_DEBUG1
00274 fprintf( stderr, "[RioBrowserPlugin - startRioClient] Finish\n" );
00275 #endif
00276 }
00277
00278 static int isComplete( void )
00279 {
00280 int mask;
00281 int result;
00282
00283 #ifdef RIO_DEBUG1
00284 fprintf( stderr, "[RioBrowserPlugin - isComplete] Start\n" );
00285 #endif
00286
00287 result = 0;
00288 if( CurMask == MaskComplete )
00289 {
00290 mask = 0;
00291 if( ( CurMask & MASK_MPLAYER ) != 0 && mID != 0 )
00292 mask |= MASK_MPLAYER;
00293 if( ( CurMask & MASK_RIOCLIENT ) != 0 && rID != 0 )
00294 mask |= MASK_RIOCLIENT;
00295 if( ( CurMask & MASK_TGIF ) != 0 && tID != 0 )
00296 mask |= MASK_TGIF;
00297 if( ( CurMask & MASK_INDEX ) != 0 && iID != 0 )
00298 mask |= MASK_INDEX;
00299
00300 if( mask == MaskComplete )
00301 result = 1;
00302 }
00303
00304 #ifdef RIO_DEBUG1
00305 fprintf( stderr, "[RioBrowserPlugin - isComplete] Finish\n" );
00306 #endif
00307
00308 return( result );
00309 }
00310
00311
00312
00313 char *NPP_GetMIMEDescription( void )
00314 {
00315
00316 #ifdef RIO_DEBUG1
00317 fprintf( stderr, "[RioBrowserPlugin - NPP_GetMIMEDescription] Start-" );
00318 fprintf( stderr, "Finish\n" );
00319 #endif
00320
00321 return( "application/x-rio:xrio:RIO Browser Plug-in" );
00322 }
00323
00324 #define PLUGIN_NAME "RIO Browser Plug-in version "VERSION
00325 #define PLUGIN_DESCRIPTION "This plug-in allows RIO client to be embeded "\
00326 "into browser frames."
00327
00328 NPError NPP_GetValue( NPP instance, NPPVariable variable, void *value )
00329 {
00330 NPError err = NPERR_NO_ERROR;
00331
00332 #ifdef RIO_DEBUG1
00333 fprintf( stderr, "[RioBrowserPlugin - NPP_GetValue] Start\n" );
00334 #endif
00335
00336 #ifdef RIO_DEBUG2
00337 fprintf( stderr, "NPP_GetValue : inicio da funcao. instance = %p ",
00338 instance );
00339 fprintf( stderr, "variable = %d\n", variable );
00340 #endif
00341
00342 if( variable == NPPVpluginNameString )
00343 *( ( char ** ) value ) = PLUGIN_NAME;
00344 else if( variable == NPPVpluginDescriptionString )
00345 *( ( char ** ) value ) = PLUGIN_DESCRIPTION;
00346 else
00347 err = NPERR_GENERIC_ERROR;
00348
00349 #ifdef RIO_DEBUG2
00350 fprintf( stderr, "NPP_GetValue : fim da funcao. err = %d\n", err );
00351 #endif
00352
00353 #ifdef RIO_DEBUG1
00354 fprintf( stderr, "[RioBrowserPlugin - NPP_GetValue] Finish\n" );
00355 #endif
00356
00357 return err;
00358 }
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368 NPError NPP_Initialize( void )
00369 {
00370 int plugin_major, plugin_minor, netscape_major, netscape_minor;
00371 int error;
00372
00373 #ifdef RIO_DEBUG1
00374 fprintf( stderr, "[RioBrowserPlugin - NPP_Initialize] Start\n" );
00375 #endif
00376
00377
00378
00379 NPN_Version( &plugin_major, &plugin_minor, &netscape_major,
00380 &netscape_minor );
00381
00382 #ifdef RIO_DEBUG2
00383 fprintf( stderr, "NPP_Initialize: NPP_New plugin_major = %d\n",
00384 plugin_major );
00385 fprintf( stderr, "NPP_Initialize: NPP_New plugin_minor = %d\n",
00386 plugin_minor );
00387 fprintf( stderr, "NPP_Initialize: NPP_New netscape_major = %d\n",
00388 netscape_major );
00389 fprintf( stderr, "NPP_Initialize: NPP_New netscape_minor = %d\n",
00390 netscape_minor );
00391 #endif
00392
00393
00394
00395 if( netscape_minor < NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL )
00396 {
00397 #ifdef RIO_DEBUG2
00398 fprintf( stderr, "NPP_Initialize: NPN_PluginThreadAsyncCall nao " );
00399 fprintf( stderr, "disponivel. Usando a implementacao original do " );
00400 fprintf( stderr, "plugin!\n");
00401 #endif
00402 UseChangeSlide = 0;
00403 }
00404 else
00405 {
00406 #ifdef RIO_DEBUG2
00407 fprintf( stderr, "NPP_Initialize: NPN_PluginThreadAsyncCall " );
00408 fprintf( stderr, "disponivel. Usando a nova implementacao!\n" );
00409 #endif
00410
00411
00412
00413 if( sem_init( &ChangeSlideSemaphore, 0, 0 ) < 0 )
00414 {
00415 error = errno;
00416 fprintf( stderr, "[cederj]: sem_init failed with error %d (%s) ",
00417 error, strerror( error ) );
00418 fprintf( stderr, ". Using previous implementation!\n" );
00419 UseChangeSlide = 0;
00420 }
00421 else
00422 {
00423 #ifdef RIO_DEBUG2
00424 fprintf( stderr, "NPP_Initialize: Semaforo criado com sucesso!\n" );
00425 #endif
00426 UseChangeSlide = 1;
00427 }
00428 }
00429
00430 #ifdef RIO_DEBUG1
00431 fprintf( stderr, "[RioBrowserPlugin - NPP_Initialize] Finish\n" );
00432 #endif
00433
00434 return NPERR_NO_ERROR;
00435 }
00436
00437 #ifdef OJI
00438 jref NPP_GetJavaClass( void )
00439 {
00440 #ifdef RIO_DEBUG1
00441 fprintf( stderr, "[RioBrowserPlugin - NPP_GetJavaClass] Start-Finish\n" );
00442 #endif
00443
00444 return NULL;
00445 }
00446 #endif
00447
00448
00449
00450
00451
00452
00453
00454 void NPP_Shutdown( void )
00455 {
00456 int error;
00457
00458 #ifdef RIO_DEBUG1
00459 fprintf( stderr, "[RioBrowserPlugin - NPP_Shutdown] Start\n" );
00460 #endif
00461
00462
00463
00464 if( UseChangeSlide )
00465 {
00466 #ifdef RIO_DEBUG2
00467 fprintf( stderr, "NPP_Shutdown: Removendo o semaforo criado!\n" );
00468 #endif
00469 if( sem_destroy( &ChangeSlideSemaphore ) < 0 )
00470 {
00471 error = errno;
00472 fprintf( stderr, "[cederj]: sem_destroy failed with error " );
00473 fprintf( stderr, "%d (%s)\n", error, strerror( error ) );
00474 }
00475 }
00476
00477 #ifdef RIO_DEBUG1
00478 fprintf( stderr, "[RioBrowserPlugin - NPP_Shutdown] Finish\n" );
00479 #endif
00480 }
00481
00482
00483
00484
00485
00486 NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
00487 char *argn[], char *argv[], NPSavedData *saved )
00488 {
00489 int i, mask;
00490 NPError result;
00491 PluginInstance *This;
00492
00493 #ifdef RIO_DEBUG1
00494 fprintf( stderr, "[RioBrowserPlugin - NPP_New] Start\n" );
00495 #endif
00496
00497 result = NPERR_INVALID_INSTANCE_ERROR;
00498 if( instance != NULL )
00499 {
00500 instance->pdata = NPN_MemAlloc( sizeof( PluginInstance ) );
00501 This = ( PluginInstance * ) instance->pdata;
00502 if( This != NULL )
00503 {
00504 This->window = 0;
00505 This->fMode = mode;
00506 This->mask = 0;
00507 This->pid = 0;
00508 for( i = 0; i < argc; i++ )
00509 {
00510 if( strcasecmp( argn[ i ], "server" ) == 0 )
00511 strcpy( server, argv[ i ] );
00512 if( strcasecmp( argn[ i ], "file" ) == 0 )
00513 strcpy( media, argv[ i ] );
00514 if( strcasecmp( argn[ i ], "mask" ) == 0 )
00515 {
00516 mask = atoi( argv[ i ] );
00517 This->mask = ( mask & PLUGINS_MASK );
00518 if( MaskComplete == 0 )
00519 MaskComplete = ( mask >> MAX_PLUGINS );
00520
00521
00522 if( ( mask >> MAX_PLUGINS ) == MaskComplete )
00523 {
00524 CurMask = CurMask | ( mask & PLUGINS_MASK );
00525
00526 }
00527 }
00528 }
00529 result = NPERR_NO_ERROR;
00530 }
00531 else
00532 {
00533 result = NPERR_OUT_OF_MEMORY_ERROR;
00534 }
00535 }
00536
00537 #ifdef RIO_DEBUG1
00538 fprintf( stderr, "[RioBrowserPlugin - NPP_New] Finish\n" );
00539 #endif
00540
00541 return result;
00542 }
00543
00544
00545 NPError NPP_Destroy( NPP instance, NPSavedData **save )
00546 {
00547 NPError result;
00548 PluginInstance *This;
00549
00550 #ifdef RIO_DEBUG1
00551 fprintf( stderr, "[RioBrowserPlugin - NPP_Destroy] Start\n" );
00552 #endif
00553
00554 result = NPERR_INVALID_INSTANCE_ERROR;
00555 if( instance != NULL )
00556 {
00557 This = ( PluginInstance* ) instance->pdata;
00558 if( This != NULL )
00559 {
00560 if( This->pid )
00561 kill( This->pid, 15 );
00562 NPN_MemFree( instance->pdata );
00563 instance->pdata = NULL;
00564 }
00565 result = NPERR_NO_ERROR;
00566 }
00567
00568 #ifdef RIO_DEBUG1
00569 fprintf( stderr, "[RioBrowserPlugin - NPP_Destroy] Finish\n" );
00570 #endif
00571
00572 return result;
00573 }
00574
00575 NPError NPP_SetWindow( NPP instance, NPWindow *window )
00576 {
00577 int port = 0;
00578 NPError result;
00579 PluginInstance *This;
00580
00581 #ifdef RIO_DEBUG1
00582 fprintf( stderr, "[RioBrowserPlugin - NPP_SetWindow] Start\n" );
00583 #endif
00584
00585 result = NPERR_INVALID_INSTANCE_ERROR;
00586 if( instance != NULL )
00587 {
00588 This = ( PluginInstance * )instance->pdata;
00589
00590
00591
00592
00593
00594
00595
00596
00597 This->window = ( Window ) window->window;
00598 This->x = window->x;
00599 This->y = window->y;
00600 This->width = window->width;
00601 This->height = window->height;
00602 This->fWindow = window;
00603 This->display = ( ( NPSetWindowCallbackStruct * ) window->ws_info )
00604 ->display;
00605
00606 switch( This->mask )
00607 {
00608 case MASK_MPLAYER:
00609 mID = This->window;
00610 break;
00611 case MASK_RIOCLIENT:
00612 rID = This->window;
00613 break;
00614 case MASK_TGIF:
00615 tID = This->window;
00616 break;
00617 case MASK_INDEX:
00618 iID = This->window;
00619 break;
00620 }
00621
00622 if( isComplete() )
00623 {
00624 if( ( MaskComplete & MASK_MPLAYER ) != 0 &&
00625 ( MaskComplete & MASK_RIOCLIENT ) != 0 )
00626 {
00627 if( ( MaskComplete & MASK_TGIF ) == 0 )
00628 if( ( port = startListenerThread( instance ) ) == 0 )
00629 {
00630 fprintf( stderr, "[cederj]: Could not find a free " );
00631 fprintf( stderr, "UDP port\n" );
00632 }
00633 startRioClient( This, port );
00634 }
00635 MaskComplete = CurMask = 0;
00636 mID = rID = tID = iID = 0;
00637 }
00638 result = NPERR_NO_ERROR;
00639 }
00640
00641 #ifdef RIO_DEBUG1
00642 fprintf( stderr, "[RioBrowserPlugin - NPP_SetWindow] Finish\n" );
00643 #endif
00644
00645 return result;
00646 }
00647
00648
00649 NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream,
00650 NPBool seekable, uint16 *stype )
00651 {
00652 PluginInstance* This;
00653
00654 #ifdef RIO_DEBUG1
00655 fprintf( stderr, "[RioBrowserPlugin - NPP_NewStream] Start\n" );
00656 #endif
00657
00658 if (instance == NULL)
00659 return NPERR_INVALID_INSTANCE_ERROR;
00660
00661 This = ( PluginInstance* ) instance->pdata;
00662
00663 #ifdef RIO_DEBUG1
00664 fprintf( stderr, "[RioBrowserPlugin - NPP_NewStream] Finish\n" );
00665 #endif
00666
00667 return NPERR_NO_ERROR;
00668 }
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682 int32 STREAMBUFSIZE = 0X0FFFFFFF;
00683
00684
00685
00686 int32 NPP_WriteReady( NPP instance, NPStream *stream )
00687 {
00688 PluginInstance *This;
00689
00690 #ifdef RIO_DEBUG1
00691 fprintf( stderr, "[RioBrowserPlugin - NPP_WriteReady] Start\n" );
00692 #endif
00693
00694 if( instance != NULL )
00695 This = ( PluginInstance * )instance->pdata;
00696
00697 #ifdef RIO_DEBUG1
00698 fprintf( stderr, "[RioBrowserPlugin - NPP_WriteReady] Finish\n" );
00699 #endif
00700
00701
00702 return STREAMBUFSIZE;
00703 }
00704
00705
00706 int32 NPP_Write( NPP instance, NPStream *stream, int32 offset, int32 len,
00707 void *buffer )
00708 {
00709 PluginInstance *This;
00710
00711 #ifdef RIO_DEBUG1
00712 fprintf( stderr, "[RioBrowserPlugin - NPP_Write] Start\n" );
00713 #endif
00714
00715 if( instance != NULL )
00716 This = ( PluginInstance * )instance->pdata;
00717
00718 #ifdef RIO_DEBUG1
00719 fprintf( stderr, "[RioBrowserPlugin - NPP_Write] Finish\n" );
00720 #endif
00721
00722 return len;
00723 }
00724
00725 NPError NPP_DestroyStream( NPP instance, NPStream *stream, NPError reason )
00726 {
00727 PluginInstance *This;
00728
00729 #ifdef RIO_DEBUG1
00730 fprintf( stderr, "[RioBrowserPlugin - NPP_DestroyStream] Start\n" );
00731 #endif
00732
00733 if( instance == NULL )
00734 {
00735
00736 #ifdef RIO_DEBUG1
00737 fprintf( stderr, "[RioBrowserPlugin - NPP_DestroyStream] Finish1\n" );
00738 #endif
00739
00740 return NPERR_INVALID_INSTANCE_ERROR;
00741 }
00742 This = ( PluginInstance * )instance->pdata;
00743
00744 #ifdef RIO_DEBUG1
00745 fprintf( stderr, "[RioBrowserPlugin - NPP_DestroyStream] Finish2\n" );
00746 #endif
00747
00748 return NPERR_NO_ERROR;
00749 }
00750
00751
00752 void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname )
00753 {
00754 PluginInstance *This;
00755
00756 #ifdef RIO_DEBUG1
00757 fprintf( stderr, "[RioBrowserPlugin - NPP_StreamAsFile] Start\n" );
00758 #endif
00759
00760 if( instance != NULL )
00761 This = ( PluginInstance * )instance->pdata;
00762
00763 #ifdef RIO_DEBUG1
00764 fprintf( stderr, "[RioBrowserPlugin - NPP_StreamAsFile] Finish\n" );
00765 #endif
00766 }
00767
00768
00769 void NPP_Print( NPP instance, NPPrint* printInfo )
00770 {
00771 #ifdef RIO_DEBUG1
00772 fprintf( stderr, "[RioBrowserPlugin - NPP_Print] Start-Finish\n" );
00773 #endif
00774 }
00775
00776
00777
00778 void NPP_URLNotify( NPP instance, const char *url, NPReason reason,
00779 void *notifyData )
00780 {
00781 #ifdef RIO_DEBUG1
00782 fprintf( stderr, "[RioBrowserPlugin - NPP_URLNotify] Start-Finish\n" );
00783 #endif
00784 }
00785