• 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
re: Internet Connect Notification on failure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Internet Connect Notification on failure


  • Subject: re: Internet Connect Notification on failure
  • From: "Txinto Vaz" <email@hidden>
  • Date: Wed, 24 Jan 2007 16:17:26 +0000

Hi, firstable, I don't know how to continue a thread instead of continuing this one.
Second, I'm sorry I have not a very good english.

I am developing a GPRS/mobile connection for cars, and I need to reconnect.  Using simpledial example is ok for me, but the internect connect notification on failures is not good for me.  I'm a newbie in mailing lists and mac os x development.

I have read this answer, but I don't know how to do it.  I have tested this, but it does not work, when trying to connect to a Bluetooth modem the failure alert appears:

        ok = SCNetworkConnectionCopyUserPreferences(
            NULL,
            &serviceToDial,
            &optionsForDial
        );
        if ( ! ok ) {
            err = SCError();
        }
        else
        {
            if (optionsForDial!=NULL)
            {
                dicc = CFDictionaryCreateMutableCopy(NULL, 0, optionsForDial);
                fprintf(stderr, "Copio el diccionario\n");
            }
            else
            {
                dicc = CFDictionaryCreateMutable(NULL, 0, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
                fprintf(stderr, "Creo el diccionario\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();
        }
    }

....

Thank you for your help.

Tx.

[Date Prev][ Date Next][ Thread Prev][Thread Next][ Date Index][ Thread Index]

re: Internet Connect Notification on failure


  • Subject: re: Internet Connect Notification on failure
  • From: Rich Kubota <email@hidden
    Along with all the other PPP options, the caller of the SCNetworkConnection API can add the following key to the PPP dictionary:

     "AlertEnable" , type Integer, value 0 --> will disable all ppp alerts.

    I'm using the "snazzy" System Configuration framework introduced in 10.3 to manage PPP connections.

     However, when I use:

     SCNetworkConnectionStart

     Then process all the lovely notification.

    And then after the connection fails, Internet Connect displays a connection failed dialog to notify the user. Well since I already know the connection failed, and in this case there is no user, this dialog is useless. To make matters worse, when the software tries to connect again, and it fails again I get a second notification from Internet Connect. Over time I can end up with numerous useless user notifications.

    So my question is, is there a way to prevent Internet Connect from displaying these failure notifications ? If so, how ???

    _______________________________________________
    Do not post admin requests to the list. They will be ignored.
    Macnetworkprog mailing list (<mailto:email@hidden>email@hidden)
    Help/Unsubscribe/Update your Subscription:
    best wishes.
    --
    Sincerely,
    Rich Kubota
    email@hidden
    (408) 974-6212
    _______________________________________________
    Do not post admin requests to the list. They will be ignored.
     _______________________________________________
    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: How does the OS manage to email faxes?
    • Next by Date: Cocoa, WebServices and J5EE working in harmony (almost)
    • Previous by thread: Re: How does the OS manage to email faxes?
    • Next by thread: Cocoa, WebServices and J5EE working in harmony (almost)
    • Index(es):
      • Date
      • Thread