Develop and Download Open Source Software

Browse CVS Repository

Diff of /xoonips/AL/xnpal.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.43 by tani, Fri Jun 24 02:09:00 2005 UTC revision 1.44 by aga4096, Wed Jun 29 00:10:18 2005 UTC
# Line 1304  result_t eventToZval( const event_t *pEv Line 1304  result_t eventToZval( const event_t *pEv
1304          add_assoc_long  ( z, "event_id"      , pEvent -> getEventID()       );          add_assoc_long  ( z, "event_id"      , pEvent -> getEventID()       );
1305          add_assoc_long  ( z, "event_type_id" , pEvent -> getEventTypeID()   );          add_assoc_long  ( z, "event_type_id" , pEvent -> getEventTypeID()   );
1306                    
1307          if ( pEvent->isValidTimestamp    () ) add_assoc_long  ( z, "timestamp"     , pEvent -> getTimestamp()     );          if ( pEvent->isValidTimestamp     () ) add_assoc_long  ( z, "timestamp"      , pEvent -> getTimestamp()     );
1308          if ( pEvent->isValidExecUID      () ) add_assoc_long  ( z, "exec_uid"      , pEvent -> getExecUID()       );          if ( pEvent->isValidExecUID       () ) add_assoc_long  ( z, "exec_uid"       , pEvent -> getExecUID()       );
1309          if ( pEvent->isValidIndexID      () ) add_assoc_long  ( z, "index_id"      , pEvent -> getIndexID()       );          if ( pEvent->isValidIndexID       () ) add_assoc_long  ( z, "index_id"       , pEvent -> getIndexID()       );
1310          if ( pEvent->isValidItemID       () ) add_assoc_long  ( z, "item_id"       , pEvent -> getItemID()        );          if ( pEvent->isValidItemID        () ) add_assoc_long  ( z, "item_id"        , pEvent -> getItemID()        );
1311          if ( pEvent->isValidFileID       () ) add_assoc_long  ( z, "file_id"       , pEvent -> getFileID()        );          if ( pEvent->isValidFileID        () ) add_assoc_long  ( z, "file_id"        , pEvent -> getFileID()        );
1312          if ( pEvent->isValidUID          () ) add_assoc_long  ( z, "uid"           , pEvent -> getUID()           );          if ( pEvent->isValidUID           () ) add_assoc_long  ( z, "uid"            , pEvent -> getUID()           );
1313          if ( pEvent->isValidGID          () ) add_assoc_long  ( z, "gid"           , pEvent -> getGID()           );          if ( pEvent->isValidGID           () ) add_assoc_long  ( z, "gid"            , pEvent -> getGID()           );
1314          if ( pEvent->isValidRemoteHost   () ) add_assoc_string( z, "remote_host"   , (char*)pEvent -> getRemoteHost()   , 1 );          if ( pEvent->isValidRemoteHost    () ) add_assoc_string( z, "remote_host"    , (char*)pEvent -> getRemoteHost()    , 1 );
1315          if ( pEvent->isValidSearchKeyword() ) add_assoc_string( z, "search_keyword", (char*)pEvent -> getSearchKeyword(), 1 );          if ( pEvent->isValidSearchKeyword () ) add_assoc_string( z, "search_keyword" , (char*)pEvent -> getSearchKeyword() , 1 );
1316          if ( pEvent->isValidLoginName    () ) add_assoc_string( z, "login_name"    , (char*)pEvent -> getLoginName()    , 1 );          if ( pEvent->isValidAdditionalInfo() ) add_assoc_string( z, "additional_info", (char*)pEvent -> getAdditionalInfo(), 1 );
1317    
1318          return RES_OK;          return RES_OK;
1319  }  }
# Line 3775  ZEND_FUNCTION(xnp_insert_event) Line 3775  ZEND_FUNCTION(xnp_insert_event)
3775                    
3776          long indexID=0, itemID=0, fileID=0, uid=0, gid=0;          long indexID=0, itemID=0, fileID=0, uid=0, gid=0;
3777          char* searchKeyword = 0;          char* searchKeyword = 0;
3778          char* loginName = 0;          char* additionalInfo = 0;
3779          HashTable *h = Z_ARRVAL_P(zparams);          HashTable *h = Z_ARRVAL_P(zparams);
3780          hashGetLong( h, "index_id", &indexID );          hashGetLong( h, "index_id", &indexID );
3781          hashGetLong( h, "item_id" , &itemID  );          hashGetLong( h, "item_id" , &itemID  );
# Line 3783  ZEND_FUNCTION(xnp_insert_event) Line 3783  ZEND_FUNCTION(xnp_insert_event)
3783          hashGetLong( h, "uid"     , &uid );          hashGetLong( h, "uid"     , &uid );
3784          hashGetLong( h, "gid"     , &gid );          hashGetLong( h, "gid"     , &gid );
3785          hashGetString( h, "search_keyword" , &searchKeyword );          hashGetString( h, "search_keyword" , &searchKeyword );
3786          hashGetString( h, "login_name"     , &loginName );          hashGetString( h, "additional_info", &additionalInfo );
3787                    
3788          event_t ev;          event_t ev;
3789          ev.setEventTypeID  ( eventTypeID   );          ev.setEventTypeID   ( eventTypeID    );
3790          ev.setTimestamp    ( timestamp     );          ev.setTimestamp     ( timestamp      );
3791          ev.setExecUID      ( execUID       );          ev.setExecUID       ( execUID        );
3792          ev.setIndexID      ( indexID       );          ev.setIndexID       ( indexID        );
3793          ev.setItemID       ( itemID        );          ev.setItemID        ( itemID         );
3794          ev.setFileID       ( fileID        );          ev.setFileID        ( fileID         );
3795          ev.setUID          ( uid           );          ev.setUID           ( uid            );
3796          ev.setGID          ( gid           );          ev.setGID           ( gid            );
3797          ev.setRemoteHost   ( remoteHost    );          ev.setRemoteHost    ( remoteHost     );
3798          ev.setSearchKeyword( searchKeyword );          ev.setSearchKeyword ( searchKeyword  );
3799          ev.setLoginName    ( loginName     );          ev.setAdditionalInfo( additionalInfo );
3800                    
3801          result = insertEvent( sid, &ev );          result = insertEvent( sid, &ev );
3802                    

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26