Exemplo n.º 1
0
 private void OnEntryGroupCallback(IntPtr group, EntryGroupState state, IntPtr userdata)
 {
     if (StateChanged != null)
     {
         StateChanged(this, new EntryGroupStateArgs(state));
     }
 }
Exemplo n.º 2
0
        private void OnEntryGroupStateChanged(EntryGroupState state, string error)
        {
            switch (state)
            {
            case EntryGroupState.Collision:
                if (!OnResponse(ErrorCode.Collision))
                {
                    if (originalName == null)
                    {
                        originalName = Name;
                    }
                    Name = originalName + " (" + retryNameModifier + ")";
                    retryNameModifier++;
                    Console.WriteLine("ZeroConf had a name collision, trying: " + Name);
                    Register();
                    // throw new ApplicationException ();
                }
                break;

            case EntryGroupState.Failure:
                if (!OnResponse(ErrorCode.Failure))
                {
                    Console.WriteLine("Mono.ZeroConf failed to register name with AvahiDBus");
                    // throw new ApplicationException ();
                }
                break;

            case EntryGroupState.Established:
                OnResponse(ErrorCode.Ok);
                break;
            }
        }
Exemplo n.º 3
0
        private void OnEntryGroupStateChanged(EntryGroupState state, string error)
        {
            switch (state)
            {
            case EntryGroupState.Collision:
                if (!OnResponse(ErrorCode.Collision))
                {
                    throw new ApplicationException();
                }
                break;

            case EntryGroupState.Failure:
                if (!OnResponse(ErrorCode.Failure))
                {
                    throw new ApplicationException();
                }
                break;

            case EntryGroupState.Established:
                OnResponse(ErrorCode.Ok);
                break;
            }
        }
Exemplo n.º 4
0
 public EntryGroupStateArgs(EntryGroupState state)
 {
     this.state = state;
 }
Exemplo n.º 5
0
 private void OnEntryGroupCallback(IntPtr group, EntryGroupState state, IntPtr userdata)
 {
     if (StateChanged != null)
         StateChanged (this, new EntryGroupStateArgs (state));
 }
Exemplo n.º 6
0
        private void OnEntryGroupStateChanged (EntryGroupState state, string error)
        {
            switch (state) {
                case EntryGroupState.Collision:
                    if (!OnResponse (ErrorCode.Collision)) {
						if (originalName == null)
							originalName = Name;
						
						Name = originalName + " (" + retryNameModifier + ")";
						retryNameModifier++;
						
						Console.WriteLine("ZeroConf had a name collision, trying: " + Name);
						
						Register();
                        //throw new ApplicationException ();
                    }
                    break;
                case EntryGroupState.Failure:
                    if (!OnResponse (ErrorCode.Failure)) {
						Console.WriteLine("Mono.ZeroConf failed to register name with AvahiDBus");
                        //throw new ApplicationException ();
                    }
                    break;
                case EntryGroupState.Established:
                    OnResponse (ErrorCode.Ok);
                    break;
            }
        }
Exemplo n.º 7
0
 private void OnEntryGroupStateChanged (EntryGroupState state, string error)
 {
     switch (state) {
         case EntryGroupState.Collision:
             if (!OnResponse (ErrorCode.Collision)) {
                 throw new ApplicationException ();
             }
             break;
         case EntryGroupState.Failure:
             if (!OnResponse (ErrorCode.Failure)) {
                 throw new ApplicationException ();
             }
             break;
         case EntryGroupState.Established:
             OnResponse (ErrorCode.Ok);
             break;
     }
 }
Exemplo n.º 8
0
 public EntryGroupStateArgs(EntryGroupState state)
 {
     this.state = state;
 }