Examples of GOIMGameItem


Examples of net.sphene.goim.rcp.beans.GOIMGameItem

  }

  private void joinServer(GameServer server) {
    GOIMGameList gameList = GOIMPlugin
        .getPreferenceObject(GOIMGameList.class);
    GOIMGameItem game = gameList
        .getGameItemForExtensionId(server.gameid);
    if (game != null && server.getGameExtension() != null) {
      server.getGameExtension().getDelegate().execute(game,
          new GameDestination(game, server.address));
    }
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem

    query.serverName = serverName;
    return query;
  }

  public GOIMGameItem autoDetect(GameExtensionProxy proxy) {
    GOIMGameItem item = autoDetect(proxy,"SOFTWARE\\Unreal Technology\\Installed Apps\\UT2004","Folder","System\\UT2004.exe");
    try {
      item.version = autoDetectGetRegistryKeyValue("SOFTWARE\\Unreal Technology\\Installed Apps\\UT2004","Version");
    } catch(Exception e) {
     
    }
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem

    Iterator i = presence.getExtensions();
    while(i.hasNext()) {
      Object o = i.next();
      if(o instanceof IGameExtension) {
        final IGameExtension gameEx = (IGameExtension)o;
        final GOIMGameItem game = gameEx.getGameItem();
        final GameExtensionProxy proxy = gameEx.getGameExtension();
        final InetSocketAddress target = gameEx.getDestination();
        Label label = new Label(games,SWT.NULL);
        tk.adapt(label,false,false);
        label.setImage(proxy.getIcon().createImage());
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem

    buttonSave.setText("Save");
    buttonSave.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        boolean createNew = false;
        if(gameItem == null) {
          gameItem = new GOIMGameItem();
          createNew = true;
        }
        gameItem.gameId = games.get(comboGame.getSelectionIndex()).id;
        gameItem.version = textVersion.getText();
        gameItem.path = textPath.getText();
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem

        });
    buttonEdit = new Button(compositeButtons, SWT.NONE);
    buttonEdit.setText("Edit Game");
    buttonEdit.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        GOIMGameItem gameItem = getCurrentSelectedGameItem();
        if(gameItem == null) return;
        GOIMPreferenceGameGUIEditGame.createNewShell(getShell(),gameItem,gameList);
      }
    });
    buttonRemove = new Button(compositeButtons, SWT.NONE);
    buttonRemove.setText("Remove Game");
    buttonAutoDetect = new Button(compositeButtons, SWT.NONE);
    buttonAutoDetect.setText("Autodetect");
    buttonAutoDetect
        .addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
          public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
            GameUtils.autodetectGames(gameList);
          }
        });
    buttonRemove
        .addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
          public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
            GOIMGameItem gameItem = getCurrentSelectedGameItem();
            if(gameItem == null) return;
            gameList.remove(gameItem);
          }
        });
  }
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem

    File file = (appendToFileName == null ||
        appendToFileName.equals("") ? new File(path) :
          new File(path,appendToFileName));
    if(!file.exists())
      return null;
    GOIMGameItem item = new GOIMGameItem();
    item.gameId = proxy.id;
    try {
      item.path = file.getCanonicalPath();
    } catch (IOException e) {
      throw new RuntimeException(e);
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem


  public abstract GOIMGameItem autoDetect(GameExtensionProxy proxy);

  public GOIMGameItem autoDetect(GameExtensionProxy proxy, GOIMGameList gameList) {
    GOIMGameItem item = autoDetect(proxy);
    if(item != null) {
      boolean isInList = false;
      for(GOIMGameItem gameItem : gameList) {
        if(gameItem.gameId.equals(item.gameId) && new File(gameItem.path).equals(new File(item.path))) {
          isInList = true;
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem

        if (ex instanceof IGameExtension) {
          extensions++;
          if (editor == null)
            editor = getEditor(item, true);
          final IGameExtension gameEx = (IGameExtension) ex;
          final GOIMGameItem game = gameEx.getGameItem();
          final GameExtensionProxy proxy = gameEx.getGameExtension();
          // final InetSocketAddress target = gameEx.getDestination();
          Label label = new Label((Composite) editor.getEditor(),
              SWT.NULL);
          // Button label = new
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem

  public void appsChanged(ArrayList<App> appList) {
    Map<Integer, Object> apps = new HashMap<Integer,Object>();
    int[][] conns = new int[appList.size()][6];
    int i = 0;
    for(App app : appList) {
      GOIMGameItem proxy = getGame(app);
      if(proxy == null) continue;
      if(this.apps != null && this.apps.remove(app.port) == null) {
        System.out.println("===== NEW BIND: " + app.port + ": " + app.path);
      }
      apps.put(app.port,proxy);
      conns[i][0] = app.a;
      conns[i][1] = app.b;
      conns[i][2] = app.c;
      conns[i][3] = app.d;
      conns[i][4] = app.port;
      conns[i][5] = app.port;
      i++;
    }
    int[][] realconns = new int[i][6];
    for(int j = 0 ; j < i ; j++) {
      for(int k = 0 ; k < 6 ; k++)
        realconns[j][k] = conns[j][k];
    }
    sniffUdpConns.setApps(apps,realconns);
    if(this.apps != null) {
      for(Integer app : this.apps.keySet()) {
        GOIMGameItem gameItem = (GOIMGameItem)this.apps.get(app);
        System.out.println("Disconnected: " + gameItem.path + " ?? port: " + app.toString());
        gameItem.retrieveExtensionProxy().closedUdpPort(gameItem,app.intValue());
      }
    }
    GOIMSniffUdpConns.this.apps = apps;
  }
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMGameItem

    this.apps = apps;
  }

  @Override
  public void gotOutgoing(int id, long ip, int port, int sourceport) {
    GOIMGameItem obj = (GOIMGameItem)apps.get(id);
    //short portval = (short) port;
    //System.out.println("Got outgoing(" + id + "): " + (obj == null ? "null?!":obj.toString()));
    //System.out.println("Port: " + Integer.toString(port));
    byte myip[] = new byte[] { (byte)((ip >> 24) & 0xFF),
        (byte)((ip >> 16) & 0xFF),
        (byte)((ip >> 8& 0xFF),
        (byte)((ip        & 0xFF)) };
    try {
      if(obj != null)
        obj.retrieveExtensionProxy().sniffedPacketFromGame(obj,new InetSocketAddress(InetAddress.getByAddress(myip),port), sourceport);
    } catch (UnknownHostException e) {
      e.printStackTrace();
    } catch (NullPointerException e) {
      e.printStackTrace();
      System.err.println("Null pointer exception ... obj: " + obj);
      if(obj != null)
        System.err.println("obj: " + obj.toString() + " ... obj.retrieveExtensionProxy: " + obj.retrieveExtensionProxy());
    }
    //System.out.printf("I got a connection from %s to " + myip[0] + "." + myip[1] + "." + myip[2] + "." + myip[3] + ":%d\n",obj.name,myip[0],myip[1],myip[2],myip[3],port);
    //System.out.printf("Got Outgoing (%d) by %s to %d,%d,%d,%d:%d\n",id,(obj == null ? "null" : obj.toString()),
    //   
    //    port
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.