Split winexe.h into async.h and svcinstall.h
authorThomas Hood <jdthood@gmail.com>
Thu, 1 Sep 2011 11:26:36 +0000 (13:26 +0200)
committerThomas Hood <jdthood@gmail.com>
Thu, 1 Sep 2011 11:26:36 +0000 (13:26 +0200)
source/async.c
source/svcinstall.c
source/winexe.c
source/winexe.h

index b23726bd6f4ce586de81d6ce6d125514cbd8134f..1da3565b0792145e437c6166e83cd63db5083e32 100644 (file)
@@ -7,7 +7,8 @@
 #include "includes.h"
 #include "libcli/libcli.h"
 #include "libcli/raw/raw_proto.h"
-#include "winexe.h"
+
+#include "async.h"
 
 #define USE_OPENX_CALL
 
index 2cca942dfd37744d08a298dc633cf5df9c285406..5ea07bc6b506d431631504b1cf88e9912caeeb18 100644 (file)
@@ -29,7 +29,7 @@
 #include "libcli/smb_composite/smb_composite.h"
 #include "lib/util/util.h"
 
-#include "winexe.h"
+#include "svcinstall.h"
 
 #include "shared.h"
 #define SERVICE_NAME_DOT_EXE SERVICE_NAME ".exe"
index 6d3aa7956209910998d75d9f6862f88e724fcc82..0a49871fa122483f0a84a54625c560e1dad1dc49 100644 (file)
@@ -17,7 +17,8 @@
 #include "libcli/composite/composite.h"
 #include "auth/credentials/credentials.h"
 
-#include "winexe.h"
+#include "async.h"
+#include "svcinstall.h"
 #include "shared.h"
 
 #include <sys/fcntl.h>
index 81c6e3cfe07bd63bc650a2cd4b9e9d5a39b5f7d6..9dcf44d26af46c349df414165db1546c211a93f7 100644 (file)
@@ -3,71 +3,3 @@
    Contact: andrzej.hajda@wp.pl
    License: GNU General Public License version 3
 */
-
-#define SVC_INTERACTIVE 1
-#define SVC_IGNORE_INTERACTIVE 2
-#define SVC_INTERACTIVE_MASK 3
-#define SVC_FORCE_UPLOAD 4
-#define SVC_OS64BIT 8
-#define SVC_OSCHOOSE 16
-#define SVC_UNINSTALL 32
-#define SVC_SYSTEM 64
-
-/* svcinstall.c */
-NTSTATUS svc_install(const char *hostname,
-                    struct cli_credentials *credentials, int flags);
-NTSTATUS svc_uninstall(const char *hostname,
-                      struct cli_credentials *credentials);
-
-/* async.c */
-enum { ASYNC_OPEN, ASYNC_OPEN_RECV, ASYNC_READ, ASYNC_READ_RECV,
-           ASYNC_WRITE, ASYNC_WRITE_RECV, ASYNC_CLOSE, ASYNC_CLOSE_RECV };
-typedef void (*async_cb_open) (void *ctx);
-typedef void (*async_cb_read) (void *ctx, const char *data, int len);
-typedef void (*async_cb_close) (void *ctx);
-typedef void (*async_cb_error) (void *ctx, int func, NTSTATUS status);
-
-struct list_item {
-       struct list_item *next;
-       int size;
-       char data[0];
-};
-
-struct list {
-       struct list_item *begin;
-       struct list_item *end;
-};
-
-struct async_context {
-/* Public - must be initialized by client */
-       struct smbcli_tree *tree;
-       void *cb_ctx;
-       async_cb_open cb_open;
-       async_cb_read cb_read;
-       async_cb_close cb_close;
-       async_cb_error cb_error;
-/* Private - internal usage, initialize to zeros */
-       int fd;
-       union smb_open *io_open;
-       union smb_read *io_read;
-       union smb_write *io_write;
-       union smb_close *io_close;
-       struct smbcli_request *rreq;
-       struct smbcli_request *wreq;
-       struct list wq;
-       char buffer[256];
-};
-
-int async_open(struct async_context *c, const char *fn, int open_mode);
-int async_write(struct async_context *c, const void *buf, int len);
-int async_close(struct async_context *c);
-
-extern struct tevent_context *ev_ctx;
-
-/* winexesvc32_exe.c */
-extern unsigned int winexesvc32_exe_len;
-extern unsigned char winexesvc32_exe[];
-
-/* winexesvc64_exe.c */
-extern unsigned int winexesvc64_exe_len;
-extern unsigned char winexesvc64_exe[];