Missed a few 'deprecated' markers
[samba.git] / examples / libsmbclient / testbrowse.c
index 96f78aad85af3766180ffed25478da23d076ed87..a7eda365af9a53a82f903aff47895f43f81c8d7f 100644 (file)
@@ -108,24 +108,21 @@ main(int argc, char * argv[])
     }
 
     /* Set mandatory options (is that a contradiction in terms?) */
-    context->debug = debug;
+    smbc_setDebug(context, debug);
     if (context_auth) {
-        context->callbacks.auth_fn = NULL;
-        smbc_option_set(context,
-                        "auth_function",
-                        (void *) get_auth_data_with_context_fn);
-        smbc_option_set(context, "user_data", "hello world");
+        smbc_setFunctionAuthDataWithContext(context,
+                                            get_auth_data_with_context_fn);
+        smbc_setOptionUserData(context, "hello world");
     } else {
-        context->callbacks.auth_fn =
-            (no_auth ? no_auth_data_fn : get_auth_data_fn);
+        smbc_setFunctionAuthData(context, get_auth_data_fn);
     }
 
-    /* If we've been asked to log to stderr instead of stdout... */
+    /* If we've been asked to log to stderr instead of stdout... */
     if (debug_stderr) {
         /* ... then set the option to do so */
-        smbc_option_set(context, "debug_stderr", (void *) 1);
+        smbc_setOptionDebugToStderr(context, 1);
     }
-       
+
     /* Initialize the context using the previously specified options */
     if (!smbc_init_context(context)) {
         smbc_free_context(context, 0);
@@ -199,7 +196,7 @@ get_auth_data_with_context_fn(SMBCCTX * context,
 {
     printf("Authenticating with context 0x%lx", context);
     if (context != NULL) {
-        char *user_data = smbc_option_get(context, "user_data");
+        char *user_data = smbc_getOptionUserData(context);
         printf(" with user data %s", user_data);
     }
     printf("\n");