/*
 * Class:     vista_db_dss_DSSDataReader
 * Method:    generateCatalog
 * Signature: (Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_vista_db_dss_DSSDataReader_generateCatalog
  (JNIEnv *env, jobject thisObject, jstring dssFile){
  // filename
  char localFilename[LEN2] = "";
  const char* lFilename = env->GetStringUTFChars(dssFile, JNI_FALSE);
  int filenameLength = (int) env->GetStringUTFLength(dssFile);
  if ( filenameLength > LEN2 ) {
    printf("%s\n", "Error: filename length > LEN2");
  }
  strcpy(localFilename, lFilename);
  //  cleanCharacterArray(localFilename, LEN2);
  generateCatalog(localFilename, strlen(localFilename) );
  env->ReleaseStringUTFChars(dssFile, lFilename);
}
Exemplo n.º 2
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    inforWin = new QTextEdit(this);
    debugWin = new QPlainTextEdit();
    debugWin2 = new QPlainTextEdit();
    debugWin->setWindowTitle("receive window");
    debugWin2->setWindowTitle("post window");
    //inforWin->setDisabled(true);
    //debugWin->setDisabled(true);
    setCentralWidget(inforWin);
    QMenu *testMenu = menuBar()->addMenu(tr("&Tools"));
    QMenu *test2Menu = menuBar()->addMenu(tr("&Tools2"));
    test2Menu->addAction(myTr("set timeout"), this, SLOT(setTimeout()));
    test2Menu->addAction(tr("settings"), this, SLOT(inputdata()));


    testMenu->addAction(myTr("登陆"), this, SLOT(loginsis()));
    testMenu->addAction(myTr("load thread from internet"), this, SLOT(loadthreadfromeinternet()));
    testMenu->addAction(myTr("working"), this, SLOT(working()));
    testMenu->addAction(myTr("catalog"), this, SLOT(generateCatalog()));



#define DEBUG_MODE
#ifdef DEBUG_MODE
    testMenu->addAction(myTr("load thread from file and checking"), this, SLOT(loadthreadfromfileandchecking()));
    testMenu->addAction(myTr("fixPoster"), this, SLOT(fixPoster()));

    testMenu->addAction(myTr("test"), this, SLOT(test4()));
    testMenu->addAction(myTr("fanye"), this, SLOT(fanye()));
    testMenu->addAction(myTr("robfloor"), this, SLOT(robfloor()));
    testMenu->addAction(myTr("clear cookie"), this, SLOT(clearCookie()));
    testMenu->addAction(myTr("签到"), this, SLOT(registersis()));
    //connect(nam, SIGNAL(finished(QNetworkReply*)),  this, SLOT(replyFinished(QNetworkReply*)));

    test2Menu->addAction(myTr("toggle internet mode"), this, SLOT(togglenet()));
#endif
}