move control socket handling to separate file
[mizunara.git] / mizucp / main.h
index 9192835..f30b12a 100644 (file)
 extern "C" {
 #endif
 
-#define UWCP_ENV_HOME "HOME"
-#define UWCP_CFG_DIR  ".uwfile"
-#define UWCP_COPY_DIR "copy"
+#define MZCP_ENV_HOME "HOME"
+#define MZCP_CFG_BASE ".config"
+#define MZCP_CFG_DIR  ".config/mizunara"
+#define MZCP_COPY_DIR "copy"
     
 #define CLIENT_MSG_BUFSIZE 512
     
@@ -53,22 +54,12 @@ typedef struct {
     CPBool printsocket;
 } CPSettings;
 
-typedef struct {
-    int fd;
-    char buf[CLIENT_MSG_BUFSIZE];
-    size_t pos;
-} CtrlClient;
-
-int uwcp_copy(CPSettings *settings);
-
-int uwcp_srvctrl(CPSettings *settings);
+const char* mzcp_get_cfgdir(void);
+const char* mzcp_get_copydir(void);
 
-void client_free(CtrlClient *client);
+int mzcp_copy(CPSettings *settings);
 
-int handle_messages(CtrlClient *client);
-int handle_client_msg(CtrlClient *client, sstr_t msg);
 
-void client_send_status(CtrlClient *client);
     
 #ifdef __cplusplus
 }