sftp uploader seems to be working now :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23320 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
34dafb6352
commit
718140546e
@ -428,6 +428,7 @@ VideoWindow::VideoWindow (BRect frame, const char* title, window_type type, uint
|
|||||||
fFtpInfo.imageFormat = 0;
|
fFtpInfo.imageFormat = 0;
|
||||||
fFtpInfo.translator = 0;
|
fFtpInfo.translator = 0;
|
||||||
fFtpInfo.passiveFtp = true;
|
fFtpInfo.passiveFtp = true;
|
||||||
|
fFtpInfo.uploadClient = 0;
|
||||||
strcpy(fFtpInfo.fileNameText, "filename");
|
strcpy(fFtpInfo.fileNameText, "filename");
|
||||||
strcpy(fFtpInfo.serverText, "server");
|
strcpy(fFtpInfo.serverText, "server");
|
||||||
strcpy(fFtpInfo.loginText, "login");
|
strcpy(fFtpInfo.loginText, "login");
|
||||||
@ -599,7 +600,7 @@ VideoWindow::MessageReceived(BMessage* message)
|
|||||||
if (control != NULL) {
|
if (control != NULL) {
|
||||||
int32 client;
|
int32 client;
|
||||||
message->FindInt32("client", &(fFtpInfo.uploadClient));
|
message->FindInt32("client", &(fFtpInfo.uploadClient));
|
||||||
FTPINFO("upl client = %d\n", fFtpInfo.uploadClient);//XXX
|
FTPINFO("upl client = %d\n", fFtpInfo.uploadClient);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -752,7 +753,7 @@ VideoWindow::_BuildCaptureControls(BView* theView)
|
|||||||
fUploadClientMenu->AddItem(new BMenuItem(kUploadClient[i], m));
|
fUploadClientMenu->AddItem(new BMenuItem(kUploadClient[i], m));
|
||||||
}
|
}
|
||||||
fUploadClientMenu->SetTargetForItems(this);
|
fUploadClientMenu->SetTargetForItems(this);
|
||||||
//fUploadClientMenu->FindItem(fCaptureRateSetting->Value())->SetMarked(true);
|
fUploadClientMenu->FindItem(fUploadClientSetting->Value())->SetMarked(true);
|
||||||
fUploadClientSelector = new BMenuField(aFrame, "UploadClient", "", fUploadClientMenu);
|
fUploadClientSelector = new BMenuField(aFrame, "UploadClient", "", fUploadClientMenu);
|
||||||
fUploadClientSelector->SetDivider(0.0);
|
fUploadClientSelector->SetDivider(0.0);
|
||||||
|
|
||||||
@ -832,6 +833,7 @@ VideoWindow::ApplyControls()
|
|||||||
fFileName->Invoke();
|
fFileName->Invoke();
|
||||||
PostMessage(fImageFormatMenu->FindMarked()->Message());
|
PostMessage(fImageFormatMenu->FindMarked()->Message());
|
||||||
PostMessage(fCaptureRateMenu->FindMarked()->Message());
|
PostMessage(fCaptureRateMenu->FindMarked()->Message());
|
||||||
|
PostMessage(fUploadClientMenu->FindMarked()->Message());
|
||||||
fServerName->Invoke();
|
fServerName->Invoke();
|
||||||
fLoginId->Invoke();
|
fLoginId->Invoke();
|
||||||
fPassword->Invoke();
|
fPassword->Invoke();
|
||||||
@ -861,6 +863,9 @@ VideoWindow::_SetUpSettings(const char* filename, const char* dirname)
|
|||||||
fSettings->Add(fCaptureRateSetting = new EnumeratedStringValueSetting("CaptureRate",
|
fSettings->Add(fCaptureRateSetting = new EnumeratedStringValueSetting("CaptureRate",
|
||||||
"Every 5 minutes", kCaptureRate, "capture rate expected",
|
"Every 5 minutes", kCaptureRate, "capture rate expected",
|
||||||
"unrecognized capture rate specified"));
|
"unrecognized capture rate specified"));
|
||||||
|
fSettings->Add(fUploadClientSetting = new EnumeratedStringValueSetting("UploadClient",
|
||||||
|
"FTP", kUploadClient, "upload client name expected",
|
||||||
|
"unrecognized upload client specified"));
|
||||||
|
|
||||||
fSettings->TryReadingSettings();
|
fSettings->TryReadingSettings();
|
||||||
}
|
}
|
||||||
@ -877,6 +882,7 @@ VideoWindow::_QuitSettings()
|
|||||||
fFilenameSetting->ValueChanged(fFileName->Text());
|
fFilenameSetting->ValueChanged(fFileName->Text());
|
||||||
fImageFormatSettings->ValueChanged(fImageFormatMenu->FindMarked()->Label());
|
fImageFormatSettings->ValueChanged(fImageFormatMenu->FindMarked()->Label());
|
||||||
fCaptureRateSetting->ValueChanged(fCaptureRateMenu->FindMarked()->Label());
|
fCaptureRateSetting->ValueChanged(fCaptureRateMenu->FindMarked()->Label());
|
||||||
|
fUploadClientSetting->ValueChanged(fUploadClientMenu->FindMarked()->Label());
|
||||||
|
|
||||||
fSettings->SaveSettings();
|
fSettings->SaveSettings();
|
||||||
delete fSettings;
|
delete fSettings;
|
||||||
|
@ -164,6 +164,7 @@ class VideoWindow : public BWindow {
|
|||||||
BooleanValueSetting* fPassiveFtpSetting;
|
BooleanValueSetting* fPassiveFtpSetting;
|
||||||
StringValueSetting* fFilenameSetting;
|
StringValueSetting* fFilenameSetting;
|
||||||
StringValueSetting* fImageFormatSettings;
|
StringValueSetting* fImageFormatSettings;
|
||||||
|
EnumeratedStringValueSetting* fUploadClientSetting;
|
||||||
EnumeratedStringValueSetting* fCaptureRateSetting;
|
EnumeratedStringValueSetting* fCaptureRateSetting;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -688,6 +688,7 @@ VideoConsumer::FtpSave(char* filename)
|
|||||||
ftp = new SftpClient;
|
ftp = new SftpClient;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
fprintf(stderr, "invalid upload client %d\n", fUploadClient);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user