separated request class
This commit is contained in:
parent
2dd76e787e
commit
c8523bc115
8 changed files with 336 additions and 209 deletions
34
MainWindow.h
34
MainWindow.h
|
@ -12,30 +12,9 @@
|
|||
#include <Window.h>
|
||||
#include <String.h>
|
||||
|
||||
#include "Conversation.h"
|
||||
|
||||
|
||||
//NEED THIS IN MAKE FILE TO USE PRIVATE HEADERS
|
||||
//CXXFLAGS = -std=c++17 -Wall -I/boot/system/develop/headers/private
|
||||
|
||||
|
||||
//Build works but Genio doesn't see class definitions unless I use full path ?
|
||||
#include "/boot/system/develop/headers/private/netservices2/NetServicesDefs.h"
|
||||
#include "/boot/system/develop/headers/private/netservices2/HttpSession.h"
|
||||
#include "/boot/system/develop/headers/private/netservices2/HttpRequest.h"
|
||||
#include "/boot/system/develop/headers/private/netservices2/HttpResult.h"
|
||||
#include "/boot/system/develop/headers/private/netservices2/HttpFields.h"
|
||||
#include "/boot/system/develop/headers/private/netservices2/ErrorsExt.h"
|
||||
|
||||
//From private headers !
|
||||
//#include <NetServicesDefs.h>
|
||||
//#include <HttpSession.h>
|
||||
//#include <HttpSession.h>
|
||||
//#include <HttpRequest.h>
|
||||
//#include <HttpResult.h>
|
||||
//#include <ErrorsExt.h>
|
||||
|
||||
|
||||
using namespace BPrivate::Network;
|
||||
|
||||
class MainWindow : public BWindow {
|
||||
public:
|
||||
|
@ -44,25 +23,18 @@ public:
|
|||
|
||||
virtual void MessageReceived(BMessage *msg);
|
||||
|
||||
void sendQuery();
|
||||
BString ReadOpenAIKey();
|
||||
Conversation* _conversation = new Conversation(this);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
BString _apiKey;
|
||||
BHttpSession _sharedSession = BHttpSession ();
|
||||
|
||||
std::optional<BHttpResult> _lastResult;
|
||||
|
||||
BMenuBar *_BuildMenu();
|
||||
BTextView * _answerView;
|
||||
BTextView * _infoView;
|
||||
BTextView* _inputField;
|
||||
//BTextControl* _inputField;
|
||||
BStatusBar* _progress;
|
||||
|
||||
BMenuItem *fSaveMenuItem;
|
||||
// BMenuItem *fSaveMenuItem;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue