Register types rather than constructors, display structs as classes.
[jelmer/samba4-debian.git] / source / libcli / climessage.c
index febd7db65cbbe4850aa13e3975ef5d092a8beb4f..5ed0e8e3cd23ada6de8f2338806fdadde8963420 100644 (file)
@@ -6,7 +6,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
+#include "libcli/libcli.h"
 
 
 /****************************************************************************
 start a message sequence
 ****************************************************************************/
-BOOL smbcli_message_start(struct smbcli_tree *tree, char *host, const char *username, 
+bool smbcli_message_start(struct smbcli_tree *tree, const char *host, const char *username, 
                       int *grp)
 {
        struct smbcli_request *req; 
@@ -38,20 +39,20 @@ BOOL smbcli_message_start(struct smbcli_tree *tree, char *host, const char *user
            !smbcli_request_receive(req) ||
            smbcli_is_error(tree)) {
                smbcli_request_destroy(req);
-               return False;
+               return false;
        }
 
        *grp = SVAL(req->in.vwv, VWV(0));
        smbcli_request_destroy(req);
 
-       return True;
+       return true;
 }
 
 
 /****************************************************************************
 send a message 
 ****************************************************************************/
-BOOL smbcli_message_text(struct smbcli_tree *tree, char *msg, int len, int grp)
+bool smbcli_message_text(struct smbcli_tree *tree, char *msg, int len, int grp)
 {
        struct smbcli_request *req; 
        
@@ -64,17 +65,17 @@ BOOL smbcli_message_text(struct smbcli_tree *tree, char *msg, int len, int grp)
            !smbcli_request_receive(req) ||
            smbcli_is_error(tree)) {
                smbcli_request_destroy(req);
-               return False;
+               return false;
        }
 
        smbcli_request_destroy(req);
-       return True;
+       return true;
 }      
 
 /****************************************************************************
 end a message 
 ****************************************************************************/
-BOOL smbcli_message_end(struct smbcli_tree *tree, int grp)
+bool smbcli_message_end(struct smbcli_tree *tree, int grp)
 {
        struct smbcli_request *req; 
        
@@ -85,10 +86,10 @@ BOOL smbcli_message_end(struct smbcli_tree *tree, int grp)
            !smbcli_request_receive(req) ||
            smbcli_is_error(tree)) {
                smbcli_request_destroy(req);
-               return False;
+               return false;
        }
 
        smbcli_request_destroy(req);
-       return True;
+       return true;
 }