15bf2b6ebSBrian Hill /* 25bf2b6ebSBrian Hill * Copyright 2017 Haiku Inc. All rights reserved. 35bf2b6ebSBrian Hill * Distributed under the terms of the MIT License. 45bf2b6ebSBrian Hill * 55bf2b6ebSBrian Hill * Authors: 65bf2b6ebSBrian Hill * Brian Hill 75bf2b6ebSBrian Hill */ 85bf2b6ebSBrian Hill #ifndef REPOSITORIES_WINDOW_H 95bf2b6ebSBrian Hill #define REPOSITORIES_WINDOW_H 105bf2b6ebSBrian Hill 115bf2b6ebSBrian Hill 125bf2b6ebSBrian Hill #include <Node.h> 135bf2b6ebSBrian Hill #include <Window.h> 145bf2b6ebSBrian Hill 155bf2b6ebSBrian Hill #include "AddRepoWindow.h" 165bf2b6ebSBrian Hill #include "RepositoriesSettings.h" 175bf2b6ebSBrian Hill #include "RepositoriesView.h" 185bf2b6ebSBrian Hill 195bf2b6ebSBrian Hill 205bf2b6ebSBrian Hill class RepositoriesWindow : public BWindow { 215bf2b6ebSBrian Hill public: 225bf2b6ebSBrian Hill RepositoriesWindow(); 235bf2b6ebSBrian Hill ~RepositoriesWindow(); 245bf2b6ebSBrian Hill virtual bool QuitRequested(); 255bf2b6ebSBrian Hill virtual void MessageReceived(BMessage*); 265bf2b6ebSBrian Hill 275bf2b6ebSBrian Hill private: 28*856ecc7bSBrian Hill void _StartWatching(); 29*856ecc7bSBrian Hill void _StopWatching(); 30*856ecc7bSBrian Hill 315bf2b6ebSBrian Hill RepositoriesSettings fSettings; 325bf2b6ebSBrian Hill RepositoriesView* fView; 335bf2b6ebSBrian Hill AddRepoWindow* fAddWindow; 345bf2b6ebSBrian Hill BMessenger fMessenger; 355bf2b6ebSBrian Hill node_ref fPackageNodeRef; 365bf2b6ebSBrian Hill // node_ref to watch for changes to package-repositories directory 375bf2b6ebSBrian Hill status_t fPackageNodeStatus; 385bf2b6ebSBrian Hill bool fWatchingPackageNode; 395bf2b6ebSBrian Hill // true when package-repositories directory is being watched 405bf2b6ebSBrian Hill }; 415bf2b6ebSBrian Hill 425bf2b6ebSBrian Hill 435bf2b6ebSBrian Hill #endif 44