• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Silent Internet Connect Dialer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Silent Internet Connect Dialer


  • Subject: Silent Internet Connect Dialer
  • From: "Txinto Vaz" <email@hidden>
  • Date: Fri, 9 Feb 2007 01:05:16 +0000

Hi, I am developing an application for cars, using the Mac.  I need to connect to internet using 3G or GPRS connection, and my software has to control the connections and interruptions of the communications.  Using the SimpleDial example from Mac I have the ability to connect from my application, but when the connection fails (very normal for my applicattion circumstances) the user (driver) must not be annoyed by alert dialogs or similar, my application must wait silently and try to reconnect later.

I have read something about setting the AlertEnable property of the PPP options dictionary to false, but I have tried to do that and the program compiles and gives no error, but the annoying alerts are still present.  Maybe I am defining the property in the wrong dictionary, or naming the property in a wrong way.

Can you help me please?

Thanks (a lot) in advance.

Tx.

PD: Here is part of my wrong code (derived from SimpleDial) ...

ok = SCNetworkConnectionCopyUserPreferences(
            NULL,
            &serviceToDial,
            &optionsForDial
        );
        if ( ! ok ) {
            err = SCError();
        }
        else
        {
            if (optionsForDial!=NULL)
            {
                dicc = CFDictionaryCreateMutableCopy(NULL, 0, optionsForDial);
                fprintf(stderr, "I copy the dictionary\n");
            }
            else
            {
                dicc = CFDictionaryCreateMutable(NULL, 0, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
                fprintf(stderr, "I create the dictionary\n");
            }
            elementValue = 0;
            elementNumRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &elementValue);
            CFDictionaryAddValue (dicc,CFSTR("AlertEnable"), elementNumRef);
            CFRelease(elementNumRef);
        }

.....


    // Initiate the connection.
   
    if (err == 0) {
        fprintf(stderr, "Connecting...\n");

        ok = SCNetworkConnectionStart(
            connection,
            dicc,
            false
        );
        if ( ! ok ) {
            err = SCError();
        }
    }

....

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Crash in AsyncSocket when scanning with nmap
  • Next by Date: CFSocketConnectToAddress() returning kCFSocketError (-1)
  • Previous by thread: Re: Crash in AsyncSocket when scanning with nmap
  • Next by thread: CFSocketConnectToAddress() returning kCFSocketError (-1)
  • Index(es):
    • Date
    • Thread