From 241e9c1fde6794199a1847adec2646b5542d860e Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 29 Feb 2012 06:49:30 -0800 Subject: [PATCH] check in files that are now different for BT variant (i.e. required for BT to be enabled) --- xwords4/android/XWords4-bt/.gitignore | 1 - xwords4/android/XWords4-bt/jni/.gitignore | 19 +++++ xwords4/android/XWords4-bt/jni/Android.mk | 79 +++++++++++++++++++ .../src/org/eehouse/android/xw4bt/.gitignore | 52 ++++++++++++ .../src/org/eehouse/android/xw4bt/XWApp.java | 64 +++++++++++++++ .../org/eehouse/android/xw4bt/jni/.gitignore | 17 ++++ 6 files changed, 231 insertions(+), 1 deletion(-) create mode 100644 xwords4/android/XWords4-bt/jni/.gitignore create mode 100644 xwords4/android/XWords4-bt/jni/Android.mk create mode 100644 xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/.gitignore create mode 100644 xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/XWApp.java create mode 100644 xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/jni/.gitignore diff --git a/xwords4/android/XWords4-bt/.gitignore b/xwords4/android/XWords4-bt/.gitignore index bd4e13450..76f8d9fe4 100644 --- a/xwords4/android/XWords4-bt/.gitignore +++ b/xwords4/android/XWords4-bt/.gitignore @@ -6,4 +6,3 @@ gen libs proguard.cfg obj -jni diff --git a/xwords4/android/XWords4-bt/jni/.gitignore b/xwords4/android/XWords4-bt/jni/.gitignore new file mode 100644 index 000000000..0b943e699 --- /dev/null +++ b/xwords4/android/XWords4-bt/jni/.gitignore @@ -0,0 +1,19 @@ +anddict.c +anddict.h +andglobals.h +andutils.c +andutils.h +drawwrapper.c +drawwrapper.h +jniutlswrapper.c +jniutlswrapper.h +LocalizedStrIncludes.h +paths.h +utils.c +utilwrapper.c +utilwrapper.h +xportwrapper.c +xportwrapper.h +xptypes.h +xwjni.c +#paths.h# diff --git a/xwords4/android/XWords4-bt/jni/Android.mk b/xwords4/android/XWords4-bt/jni/Android.mk new file mode 100644 index 000000000..2e0578166 --- /dev/null +++ b/xwords4/android/XWords4-bt/jni/Android.mk @@ -0,0 +1,79 @@ +# -*- mode: Makefile; compile-command: "cd ../; ${NDK_ROOT}/ndk-build -j3"; -*- +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +COMMON_PATH=../../../common +local_C_INCLUDES+= \ + -I$(LOCAL_PATH)/$(COMMON_PATH) \ + -I$(LOCAL_PATH)/../../../relay \ + +local_LDLIBS += -llog + +# local_DEBUG = -DMEM_DEBUG -DDEBUG -DENABLE_LOGGING +local_DEFINES += \ + $(local_DEBUG) \ + -DXWFEATURE_RELAY \ + -DXWFEATURE_BLUETOOTH \ + -DXWFEATURE_TURNCHANGENOTIFY \ + -DXWFEATURE_CHAT \ + -DCOMMS_XPORT_FLAGSPROC \ + -DKEY_SUPPORT \ + -DXWFEATURE_CROSSHAIRS \ + -DPOINTER_SUPPORT \ + -DSCROLL_DRAG_THRESHHOLD=1 \ + -DDROP_BITMAPS \ + -DDISABLE_EMPTYTRAY_UNDO \ + -DDISABLE_TILE_SEL \ + -DXWFEATURE_BOARDWORDS \ + -DXWFEATURE_WALKDICT \ + -DXWFEATURE_WALKDICT_FILTER \ + -DXWFEATURE_DICTSANITY \ + -DFEATURE_TRAY_EDIT \ + -DNODE_CAN_4 \ + -DRELAY_ROOM_DEFAULT=\"\"\ + -D__LITTLE_ENDIAN \ + + +local_SRC_FILES += \ + xwjni.c \ + utilwrapper.c \ + drawwrapper.c \ + xportwrapper.c \ + anddict.c \ + andutils.c \ + jniutlswrapper.c \ + + +COMMON_PATH=../../../common +common_SRC_FILES += \ + $(COMMON_PATH)/boarddrw.c \ + $(COMMON_PATH)/scorebdp.c \ + $(COMMON_PATH)/dragdrpp.c \ + $(COMMON_PATH)/pool.c \ + $(COMMON_PATH)/tray.c \ + $(COMMON_PATH)/dictnry.c \ + $(COMMON_PATH)/dictiter.c \ + $(COMMON_PATH)/mscore.c \ + $(COMMON_PATH)/vtabmgr.c \ + $(COMMON_PATH)/strutils.c \ + $(COMMON_PATH)/engine.c \ + $(COMMON_PATH)/board.c \ + $(COMMON_PATH)/mempool.c \ + $(COMMON_PATH)/game.c \ + $(COMMON_PATH)/server.c \ + $(COMMON_PATH)/model.c \ + $(COMMON_PATH)/comms.c \ + $(COMMON_PATH)/memstream.c \ + $(COMMON_PATH)/movestak.c \ + $(COMMON_PATH)/dbgutil.c \ + + +LOCAL_CFLAGS+=$(local_C_INCLUDES) $(local_DEFINES) -Wall +LOCAL_SRC_FILES := $(linux_SRC_FILES) $(local_SRC_FILES) $(common_SRC_FILES) +LOCAL_MODULE := xwjni +LOCAL_LDLIBS := -L${SYSROOT}/usr/lib -llog -lz + +include $(BUILD_SHARED_LIBRARY) + + diff --git a/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/.gitignore b/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/.gitignore new file mode 100644 index 000000000..36b7da154 --- /dev/null +++ b/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/.gitignore @@ -0,0 +1,52 @@ +BoardActivity.java +BoardDims.java +BoardView.java +BTInviteActivity.java +BTReceiver.java +BTService.java +ChatActivity.java +CommsTransport.java +DbgUtils.java +DBHelper.java +DBUtils.java +DictBrowseActivity.java +DictImportActivity.java +DictLangCache.java +DictListPreference.java +DictsActivity.java +DictUtils.java +DispatchNotify.java +DlgDelegate.java +EditColorPreference.java +FirstRunDialog.java +GameConfig.java +GameListAdapter.java +GamesList.java +GameUtils.java +GitVersion.java +LookupView.java +MountEventReceiver.java +MultiMsgSink.java +NBSReceiver.java +NetLaunchInfo.java +NetStateCache.java +NetUtils.java +NewGameActivity.java +PollListPreference.java +PrefsActivity.java +ReceiveNBS.java +RefreshNamesTask.java +RelayGameActivity.java +RelayMsgSink.java +RelayReceiver.java +RelayService.java +StatusReceiver.java +Toolbar.java +Utils.java +XWActivity.java +XWConstants.java +XWEditTextPreference.java +XWListActivity.java +XWListAdapter.java +XWListItem.java +XWListPreference.java diff --git a/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/XWApp.java b/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/XWApp.java new file mode 100644 index 000000000..8a127bd90 --- /dev/null +++ b/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/XWApp.java @@ -0,0 +1,64 @@ +/* -*- compile-command: "cd ../../../../../; ant debug install"; -*- */ +/* + * Copyright 2010 - 2011 by Eric House (xwords@eehouse.org). All + * rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.eehouse.android.xw4bt; + +import android.app.Application; +import android.content.Context; +import java.util.UUID; + +import org.eehouse.android.xw4bt.jni.XwJNI; + +public class XWApp extends Application { + + public static final boolean BTSUPPORTED = true; + + private static UUID s_UUID = null; + + @Override + public void onCreate() + { + super.onCreate(); + + // This one line should always get logged even if logging is + // off -- because logging is on by default until logEnable is + // called. + DbgUtils.logf( "XWApp.onCreate(); git_rev=%s", + getString( R.string.git_rev ) ); + DbgUtils.logEnable( this ); + + RelayReceiver.RestartTimer( this ); + BTService.startService( this ); + } + + public static UUID getAppUUID() + { + if ( null == s_UUID ) { + s_UUID = UUID.fromString( XwJNI.comms_getUUID() ); + } + return s_UUID; + } + + public static String getAppName( Context context ) + { + return context.getString( R.string.app_name ); + } + +} diff --git a/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/jni/.gitignore b/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/jni/.gitignore new file mode 100644 index 000000000..875d14f9d --- /dev/null +++ b/xwords4/android/XWords4-bt/src/org/eehouse/android/xw4bt/jni/.gitignore @@ -0,0 +1,17 @@ +BoardHandler.java +CommonPrefs.java +CommsAddrRec.java +CurGameInfo.java +DictInfo.java +DrawCtx.java +DrawScoreInfo.java +GameSummary.java +JNIThread.java +JNIUtilsImpl.java +JNIUtils.java +LocalPlayer.java +SyncedDraw.java +TransportProcs.java +UtilCtxtImpl.java +UtilCtxt.java +XwJNI.java