s-num-old"> 50
+  public   boolean isActive ()
51 51
 	{ return active; }
52 52
 
53 53
     void open ()
54 54
 	{ xid = 1; active = true; }
55 55
 
56
-    void close ()
56
+    public void close ()
57 57
 	{ active = false; }
58 58
     
59 59
     int getSessionId ()

+ 69 - 71
app/src/main/java/com/ptplib/usbcamera/USBCameraTest.java

@@ -1,4 +1,4 @@
1
-package com.ptplib.usbcamera;
1
+package com.ptplib.usbcamera.test;
2 2
 
3 3
 
4 4
 
@@ -36,35 +36,16 @@ package com.ptplib.usbcamera;
36 36
  */
37 37
 
38 38
 
39
-
40
-import android.annotation.SuppressLint;
41 39
 import android.app.Activity;
42
-import android.os.Bundle;
43
-import android.os.Handler;
44
-import android.os.Message;
45
-///http://www.koders.com/info.aspx?c=ProjectInfo&pid=UCBHEX8BYMVVNMXBWVSEQ1BH8A
46
-import java.io.IOException;
47
-import java.nio.ByteBuffer;
48
-import java.util.Timer;
49
-import java.util.TimerTask;
50
-
51
-import com.ptplib.usbcamera.eos.EosEventConstants;
52
-import com.ptplib.usbcamera.eos.EosInitiator;
53
-import com.ptplib.usbcamera.nikon.NikonEventConstants;
54
-import com.ptplib.usbcamera.nikon.NikonInitiator;
55
-import com.strickling.usbcamera.R;
56
-
57 40
 import android.content.BroadcastReceiver;
58 41
 import android.content.Context;
59 42
 import android.content.Intent;
60 43
 import android.content.IntentFilter;
61
-import android.hardware.usb.UsbConstants;
62 44
 import android.hardware.usb.UsbDevice;
63
-import android.hardware.usb.UsbDeviceConnection;
64
-import android.hardware.usb.UsbEndpoint;
65
-import android.hardware.usb.UsbInterface;
66 45
 import android.hardware.usb.UsbManager;
67
-import android.hardware.usb.UsbRequest;
46
+import android.os.Bundle;
47
+import android.os.Handler;
48
+import android.os.Message;
68 49
 import android.util.Log;
69 50
 import android.view.View;
70 51
 import android.widget.ArrayAdapter;
@@ -74,6 +55,23 @@ import android.widget.Spinner;
74 55
 import android.widget.TextView;
75 56
 import android.widget.Toast;
76 57
 
58
+import com.ptplib.usbcamera.BaselineInitiator;
59
+import com.ptplib.usbcamera.DeviceInfo;
60
+import com.ptplib.usbcamera.DevicePropDesc;
61
+import com.ptplib.usbcamera.NameFactory;
62
+import com.ptplib.usbcamera.PTPException;
63
+import com.ptplib.usbcamera.Response;
64
+import com.ptplib.usbcamera.Session;
65
+import com.ptplib.usbcamera.eos.EosEventConstants;
66
+import com.ptplib.usbcamera.eos.EosInitiator;
67
+import com.ptplib.usbcamera.nikon.NikonEventConstants;
68
+import com.ptplib.usbcamera.nikon.NikonInitiator;
69
+import com.strickling.usbcamera.R;
70
+
71
+import java.util.Timer;
72
+
73
+///http://www.koders.com/info.aspx?c=ProjectInfo&pid=UCBHEX8BYMVVNMXBWVSEQ1BH8A
74
+
77 75
 public class USBCameraTest extends Activity { //implements Runnable {
78 76
 
79 77
 	private USBCameraTest mainActivity = this;
@@ -236,7 +234,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
236 234
 				}
237 235
 				//tv3.setText(testInfo.toString());
238 236
 				//changeSpinnerToCanon();
239
-				if (bi== null || bi.info == null){
237
+				if (bi== null || bi.getInfo() == null){
240 238
 					tv2.setText ("Error, not connected");
241 239
 					initDevice (searchDevice());
242 240
 					return;
@@ -259,16 +257,16 @@ public class USBCameraTest extends Activity { //implements Runnable {
259 257
 				clearTV();
260 258
 				//changeSpinnerToNikon();
261 259
 				
262
-				if (bi== null || bi.info == null){
260
+				if (bi== null || bi.getInfo() == null){
263 261
 					tv2.setText ("Error, not connected");
264 262
 					return;
265 263
 				}
266
-				DeviceInfo	info = bi.info;
267
-				if (info.vendorExtensionId != 0) {
268
-					factory = factory.updateFactory (info.vendorExtensionId);
269
-					info.factory = factory;
264
+				DeviceInfo info = bi.getInfo();
265
+				if (info.getVendorExtensionId() != 0) {
266
+					factory = factory.updateFactory (info.getVendorExtensionId());
267
+					info.setFactory(factory);
270 268
 				}
271
-				tv2.setText(bi.info.toString());
269
+				tv2.setText(bi.getInfo().toString());
272 270
 			}
273 271
 		});
274 272
 
@@ -1219,7 +1217,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1219 1217
 				//Old code bi =  new EosInitiator (device, mUsbManager.openDevice(device));	
1220 1218
 				bi = new BaselineInitiator (device, mUsbManager.openDevice(device));
1221 1219
 				// Select appropriate deviceInitiator, VIDs see http://www.linux-usb.org/usb.ids
1222
-				if (bi.device.getVendorId() == EosInitiator.CANON_VID) {
1220
+				if (bi.getDevice().getVendorId() == EosInitiator.CANON_VID) {
1223 1221
 				    try {
1224 1222
 				        bi.getClearStatus();
1225 1223
 				        bi.close();
@@ -1258,7 +1256,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1258 1256
 
1259 1257
 	public void detachDevice () {
1260 1258
 		if (bi != null /*&& mDevice.equals(device)*/) {			
1261
-			if (bi.device != null) Log.d(TAG, "detachDevice: " +bi.device.getDeviceName());
1259
+			if (bi.getDevice() != null) Log.d(TAG, "detachDevice: " +bi.getDevice().getDeviceName());
1262 1260
 			try {
1263 1261
 				bi.close();
1264 1262
 			} catch (PTPException e) {
@@ -1292,7 +1290,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1292 1290
 				initDevice (device);
1293 1291
 			} else if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(action)) {
1294 1292
 				tv1.setText("USB_DEVICE_DETACHED");
1295
-				if (bi != null && bi.session != null) bi.session.close();
1293
+				if (bi != null && bi.getSession() != null) bi.getSession().close();
1296 1294
 				detachDevice ();
1297 1295
 			}	    			        
1298 1296
 		}
@@ -1335,7 +1333,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1335 1333
 	public boolean releaseShutter (Session session){
1336 1334
 		Log.d(TAG, "Starting releaseShutter");
1337 1335
 		boolean result = session.isActive();
1338
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1336
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1339 1337
 		if (!bi.isSessionActive())
1340 1338
 			try {
1341 1339
 				bi.openSession();
@@ -1360,7 +1358,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1360 1358
 	public boolean setAppreture (Session session){
1361 1359
 		Log.d(TAG, "Starting releaseShutter");
1362 1360
 		boolean result = session.isActive();
1363
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1361
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1364 1362
 		if (!bi.isSessionActive())
1365 1363
 			try {
1366 1364
 				bi.openSession();
@@ -1391,7 +1389,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1391 1389
 
1392 1390
 	public boolean setISO (Session session){
1393 1391
 		Log.d(TAG, "Starting Test: setISO");
1394
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1392
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1395 1393
 		boolean result = session.isActive();
1396 1394
 		
1397 1395
 		if (!bi.isSessionActive())
@@ -1405,7 +1403,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1405 1403
 	        int ret = 0;
1406 1404
 	        Response resp = null;
1407 1405
 	        
1408
-	        synchronized (bi.session) {
1406
+	        synchronized (bi.getSession()) {
1409 1407
 
1410 1408
 	        	try {
1411 1409
 	        		resp = bi.transact1(Command.EosSetRemoteMode, null, 1);
@@ -1446,7 +1444,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1446 1444
 	public boolean setShutter (Session session, int shutter){
1447 1445
 		Log.d(TAG, "Set Shutter");
1448 1446
 		boolean result = session.isActive();
1449
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1447
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1450 1448
 		if (!bi.isSessionActive())
1451 1449
 			try {
1452 1450
 				bi.openSession();
@@ -1474,7 +1472,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1474 1472
 	public boolean setISO (Session session, int isoValue){
1475 1473
 		Log.d(TAG, "Set ISO");
1476 1474
 		boolean result = session.isActive();
1477
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1475
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1478 1476
 		if (!bi.isSessionActive())
1479 1477
 			try {
1480 1478
 				bi.openSession();
@@ -1502,7 +1500,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1502 1500
 	public boolean setAperture (Session session, int apertureValue){
1503 1501
 		Log.d(TAG, "Set Aperture");
1504 1502
 		boolean result = session.isActive();
1505
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1503
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1506 1504
 		if (!bi.isSessionActive())
1507 1505
 			try {
1508 1506
 				bi.openSession();
@@ -1530,7 +1528,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1530 1528
 	public boolean moveFocusForward (Session session){
1531 1529
 		Log.d(TAG, "Starting moveFocusForward");
1532 1530
 		boolean result = session.isActive();
1533
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1531
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1534 1532
 		if (!bi.isSessionActive())
1535 1533
 			try {
1536 1534
 				bi.openSession();
@@ -1559,7 +1557,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1559 1557
 	public boolean moveFocusBackward (Session session){
1560 1558
 		Log.d(TAG, "Starting moveFocusBackward");
1561 1559
 		boolean result = session.isActive();
1562
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1560
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1563 1561
 		if (!bi.isSessionActive())
1564 1562
 			try {
1565 1563
 				bi.openSession();
@@ -1588,7 +1586,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1588 1586
 	public boolean setPictureSyle (Session session, int pictureValue){
1589 1587
 		Log.d(TAG, "Set setPictureSyle");
1590 1588
 		boolean result = session.isActive();
1591
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1589
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1592 1590
 		if (!bi.isSessionActive())
1593 1591
 			try {
1594 1592
 				bi.openSession();
@@ -1616,7 +1614,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1616 1614
 	public boolean setWhiteBalance (Session session, int whitebalanceValue){
1617 1615
 		Log.d(TAG, "Set setWhiteBalance");
1618 1616
 		boolean result = session.isActive();
1619
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1617
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1620 1618
 		if (!bi.isSessionActive())
1621 1619
 			try {
1622 1620
 				bi.openSession();
@@ -1644,7 +1642,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1644 1642
 	public boolean setImageQuality (Session session, int imagequalityValue){
1645 1643
 		Log.d(TAG, "Set ImageQuality");
1646 1644
 		boolean result = session.isActive();
1647
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1645
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1648 1646
 		if (!bi.isSessionActive())
1649 1647
 			try {
1650 1648
 				bi.openSession();
@@ -1671,7 +1669,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1671 1669
 	public boolean setExposure (Session session, int exposureValue){
1672 1670
 		Log.d(TAG, "Set setExposure");
1673 1671
 		boolean result = session.isActive();
1674
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1672
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1675 1673
 		if (!bi.isSessionActive())
1676 1674
 			try {
1677 1675
 				bi.openSession();
@@ -1698,7 +1696,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1698 1696
 	public boolean setDriveMode (Session session, int drivemodeValue){
1699 1697
 		Log.d(TAG, "Set setDriveMode");
1700 1698
 		boolean result = session.isActive();
1701
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1699
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1702 1700
 		if (!bi.isSessionActive())
1703 1701
 			try {
1704 1702
 				bi.openSession();
@@ -1725,7 +1723,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1725 1723
 	public boolean setMetering (Session session, int meteringValue){
1726 1724
 		Log.d(TAG, "Set setMetering");
1727 1725
 		boolean result = session.isActive();
1728
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1726
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1729 1727
 		if (!bi.isSessionActive())
1730 1728
 			try {
1731 1729
 				bi.openSession();
@@ -1752,7 +1750,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1752 1750
 	public boolean startBulb (Session session){
1753 1751
 		Log.d(TAG, "Starting releaseShutter");
1754 1752
 		boolean result = session.isActive();
1755
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1753
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1756 1754
 		if (!bi.isSessionActive())
1757 1755
 			try {
1758 1756
 				bi.openSession();
@@ -1783,7 +1781,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1783 1781
 	public boolean stopBulb (Session session){
1784 1782
 		Log.d(TAG, "Starting stopBulb");
1785 1783
 		boolean result = session.isActive();
1786
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1784
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1787 1785
 		if (!bi.isSessionActive())
1788 1786
 			try {
1789 1787
 				bi.openSession();
@@ -1813,7 +1811,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1813 1811
 	public boolean getShutterSpeed (Session session){
1814 1812
 		Log.d(TAG, "getShutterSpeed");
1815 1813
 		boolean result = session.isActive();
1816
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1814
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1817 1815
 		if (!bi.isSessionActive())
1818 1816
 			try {
1819 1817
 				bi.openSession();
@@ -1841,7 +1839,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1841 1839
 	public boolean setShutterSpeed (Session session, int speed){
1842 1840
 		Log.d(TAG, "Starting stopBulb");
1843 1841
 		boolean result = session.isActive();
1844
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1842
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1845 1843
 		if (!bi.isSessionActive())
1846 1844
 			try {
1847 1845
 				bi.openSession();
@@ -1868,7 +1866,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1868 1866
 	public boolean initLiveview (Session session){
1869 1867
 		Log.d(TAG, "Set setMetering");
1870 1868
 		boolean result = session.isActive();
1871
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1869
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1872 1870
 		if (!bi.isSessionActive())
1873 1871
 			try {
1874 1872
 				bi.openSession();
@@ -1895,7 +1893,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1895 1893
 	public boolean startLiveview (Session session){
1896 1894
 		Log.d(TAG, "Set setMetering");
1897 1895
 		boolean result = session.isActive();
1898
-		if (bi.device == null) {log("NO DEVICE OPENED"); return false;}
1896
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return false;}
1899 1897
 		if (!bi.isSessionActive())
1900 1898
 			try {
1901 1899
 				bi.openSession();
@@ -1918,7 +1916,7 @@ public class USBCameraTest extends Activity { //implements Runnable {
1918 1916
 
1919 1917
 		Log.d(TAG, "Starting releaseShutter");
1920 1918
 		boolean result = session.isActive();
1921
-		if (bi.device == null) {log("NO DEVICE OPENED"); return result;}
1919
+		if (bi.getDevice() == null) {log("NO DEVICE OPENED"); return result;}
1922 1920
 		if (!bi.isSessionActive())
1923 1921
 			try {
1924 1922
 				bi.openSession();
@@ -2042,58 +2040,58 @@ public class USBCameraTest extends Activity { //implements Runnable {
2042 2040
 		public void run() {
2043 2041
 //			Log.d(TAG, "running thread " +thread.getName());
2044 2042
 			if (thread.getName().equals(THREAD_SHUTTER)) { 
2045
-				releaseShutter (bi.session);
2043
+				releaseShutter (bi.getSession());
2046 2044
 			}; 		
2047 2045
 			if (thread.getName().equals(THREAD_TEST)) { 
2048
-				testFunction(bi.session);
2046
+				testFunction(bi.getSession());
2049 2047
 			};
2050 2048
 			if (thread.getName().equals(THREAD_STARTBULB)) { 
2051
-				startBulb(bi.session);
2049
+				startBulb(bi.getSession());
2052 2050
 			};
2053 2051
 			if (thread.getName().equals(THREAD_STOPBULB)) { 
2054
-				stopBulb(bi.session);
2052
+				stopBulb(bi.getSession());
2055 2053
 			};
2056 2054
 			if (thread.getName().equals(THREAD_SETSHUTTER)) { 
2057
-				setShutter(bi.session, shutter_value);
2055
+				setShutter(bi.getSession(), shutter_value);
2058 2056
 			};		
2059 2057
 			if (thread.getName().equals(THREAD_SETISO)) { 
2060
-				setISO(bi.session, iso_value);
2058
+				setISO(bi.getSession(), iso_value);
2061 2059
 			};
2062 2060
 			if (thread.getName().equals(THREAD_SETAPERTURE)) { 
2063
-				setAperture(bi.session, aperture_value);
2061
+				setAperture(bi.getSession(), aperture_value);
2064 2062
 			};
2065 2063
 			if (thread.getName().equals(THREAD_FOCUSFORWARD)) { 
2066
-				moveFocusForward(bi.session);
2064
+				moveFocusForward(bi.getSession());
2067 2065
 			};
2068 2066
 			if (thread.getName().equals(THREAD_FOCUSBACKWARD)) { 
2069
-				moveFocusBackward(bi.session);
2067
+				moveFocusBackward(bi.getSession());
2070 2068
 			};
2071 2069
 			if (thread.getName().equals(THREAD_SETPICTURESTYLE)) { 
2072
-				setPictureSyle(bi.session, picturestyle_value);
2070
+				setPictureSyle(bi.getSession(), picturestyle_value);
2073 2071
 			};
2074 2072
 			if (thread.getName().equals(THREAD_SETWHITEBALANCE)) { 
2075
-				setWhiteBalance(bi.session,whitebalance_value);
2073
+				setWhiteBalance(bi.getSession(),whitebalance_value);
2076 2074
 			};
2077 2075
 			if (thread.getName().equals(THREAD_SETEXPOSURE)) { 
2078
-				setExposure(bi.session, exposure_value);
2076
+				setExposure(bi.getSession(), exposure_value);
2079 2077
 			};
2080 2078
 			if (thread.getName().equals(THREAD_SETDRIVEMODE)) { 
2081
-				setDriveMode(bi.session, drivemode_value);
2079
+				setDriveMode(bi.getSession(), drivemode_value);
2082 2080
 			};		
2083 2081
 			
2084 2082
 			if (thread.getName().equals(THREAD_SETMETERING)) { 
2085
-				setMetering(bi.session, metering_value);
2083
+				setMetering(bi.getSession(), metering_value);
2086 2084
 			};
2087 2085
 			
2088 2086
 			if (thread.getName().equals(THREAD_INITLIVEVIEW)) { 
2089
-				initLiveview(bi.session);
2087
+				initLiveview(bi.getSession());
2090 2088
 				liveViewTurnedOn = true;
2091 2089
 			};
2092 2090
 			
2093 2091
 			if (thread.getName().equals(THREAD_STARTLIVEVIEW)) { 
2094 2092
 				while(liveViewTurnedOn)
2095 2093
 				{
2096
-					startLiveview(bi.session);
2094
+					startLiveview(bi.getSession());
2097 2095
 				}
2098 2096
 			};
2099 2097
 			

kodo - Gogs: Go Git Service

暂无描述

urls.py 10KB

    # -*- coding: utf-8 -*- from django.conf.urls import url from account import views as account_views from account import tourguide_views from geo import views as geo_views from group import views as group_views from group import (groupuser_views, lensman_views, tourguidegroup_views, tourguidegroupadmin_views, tourguidegroupuser_views) from message import views as message_views from miniapp import views as mini_views from operation import views as op_views from pay import views as pay_views from photo import views as photo_views from wechat import views as wechat_views # 帐户相关 urlpatterns = [ url(r'^login$', account_views.lensman_login_api, name='lensman_login_api'), # 摄影师登录 url(r'^u/is_registered$', account_views.user_is_registered_api, name='user_is_registered_api'), # 用户是否已经注册 url(r'^u/signup$', account_views.user_signup_api, name='user_signup_api'), # 用户注册 url(r'^u/login$', account_views.user_login_api, name='user_login_api'), # 用户登录 url(r'^u/wx/authorize$', account_views.user_wx_authorize_api, name='user_wx_authorize_api'), # 用户端 - 微信用户授权 url(r'^u/guest/status$', account_views.guest_status_api, name='guest_status_api'), # 游客状态(是否开启) url(r'^u/guest/login$', account_views.guest_login_api, name='guest_login_api'), # 游客登录 ] # 摄影师相关 urlpatterns += [ url(r'^l/submit$', lensman_views.lensman_submit_api, name='lensman_submit_api'), # 摄影师信息提交 url(r'^l/login$', lensman_views.lensman_login_api, name='lensman_login_api'), # 摄影师登录 url(r'^l/wx/authorize$', lensman_views.lensman_wx_authorize_api, name='lensman_wx_authorize_api'), # 摄影师端 - 微信用户授权 url(r'^l/price_fix$', lensman_views.lensman_price_fix_api, name='lensman_price_fix_api'), # 摄影师定价 url(r'^l/upload$', lensman_views.lensman_photo_upload_api, name='lensman_photo_upload_api'), # 摄影师照片上传 url(r'^l/origin_upload$', lensman_views.lensman_origin_photo_upload_api, name='lensman_origin_photo_upload_api'), # 摄影师原图上传 url(r'^l/brief$', lensman_views.lensman_brief_api, name='lensman_brief_api'), # 摄影师简报 url(r'^l/origin_wanted$', lensman_views.lensman_origin_wanted_api, name='lensman_origin_wanted_api'), # 摄影师原图订单 ] # 导游相关 urlpatterns += [ url(r'^t/submit$', tourguide_views.tourguide_submit_api, name='tourguide_submit_api'), # 导游信息提交 url(r'^t/wx/authorize$', tourguide_views.tourguide_wx_authorize_api, name='tourguide_wx_authorize_api'), # 导游端 - 微信用户授权 ] # 群组相关 urlpatterns += [ url(r'^g/create$', group_views.group_create_api, name='group_create_api'), # 群组创建 url(r'^g/detail$', group_views.group_detail_api, name='group_detail_api'), # 群组详情 url(r'^g/update$', group_views.group_update_api, name='group_update_api'), # 群组更新 url(r'^g/list$', group_views.group_list_api, name='group_list_api'), # 群组列表 url(r'^g/lock$', group_views.group_lock_api, name='group_lock_api'), # 群组锁定 url(r'^g/unlock$', group_views.group_unlock_api, name='group_unlock_api'), # 群组解锁 url(r'^g/data$', group_views.group_data_api, name='group_data_api'), # 群组数据,评论数,点赞数 ] # 群成员相关 urlpatterns += [ url(r'^g/join$', groupuser_views.group_user_join_api, name='group_join_api'), # 群成员加群 url(r'^g/remove$', groupuser_views.group_user_remove_api, name='group_remove_api'), # 群成员移除,管理员主动,群成员被动 url(r'^g/quit$', groupuser_views.group_user_quit_api, name='group_quit_api'), # 群成员退出,群成员主动 ] # 旅行团相关 urlpatterns += [ url(r'^tg/create$', tourguidegroup_views.tg_group_create_api, name='tg_group_create_api'), # 旅行团创建 url(r'^tg/detail$', tourguidegroup_views.tg_group_detail_api, name='tg_group_detail_api'), # 旅行团详情 url(r'^tg/update$', tourguidegroup_views.tg_group_update_api, name='tg_group_update_api'), # 旅行团更新 url(r'^tg/close$', tourguidegroup_views.tg_group_close_api, name='tg_group_close_api'), # 旅行团关闭 url(r'^tg/gather/start$', tourguidegroup_views.tg_group_gather_start_api, name='tg_group_gather_start_api'), # 旅行团设置集合时间和地点 # url(r'^tg/gather/end$', tourguidegroup_views.tg_group_gather_end_api, name='tg_group_gather_end_api'), # 旅行团集合结束,清理数据 url(r'^tg/token$', tourguidegroup_views.tg_group_token_api, name='tg_group_token_api'), # 旅行团权限管理票据 url(r'^tg/transfer$', tourguidegroup_views.tg_group_transfer_api, name='tg_group_transfer_api'), # 旅行团权限管理转移 url(r'^tg/admin/list$', tourguidegroupadmin_views.tg_group_admin_list_api, name='tg_group_admin_list_api'), # 旅行团管理员列表 url(r'^tg/admin/recovery$', tourguidegroupadmin_views.tg_group_admin_recovery_api, name='tg_group_admin_recovery_api'), # 旅行团管理员权限回收,管理员主动,团成员被动 url(r'^tg/admin/waiver$', tourguidegroupadmin_views.tg_group_admin_waiver_api, name='tg_group_admin_waiver_api'), # 旅行团管理员权限放弃 ] # 旅行团成员相关 urlpatterns += [ url(r'^tgu/join$', tourguidegroupuser_views.tgu_group_user_join_api, name='tgu_group_user_join_api'), # 旅行团成员加团 url(r'^tgu/remove$', tourguidegroupuser_views.tgu_group_user_remove_api, name='tgu_group_user_remove_api'), # 旅行团成员移除,管理员主动,团成员被动 url(r'^tgu/update$', tourguidegroupuser_views.tgu_group_user_update_api, name='tg_group_update_api'), # 旅行团成员信息更新 url(r'^tgu/locations$', tourguidegroupuser_views.tgu_group_user_locations_api, name='tgu_group_user_locations_api'), # 旅行团所有成员位置信息 url(r'^tgu/location$', tourguidegroupuser_views.tgu_group_user_location_api, name='tgu_group_user_location_api'), # 旅行团单个成员位置信息 ] # 飞图相关 urlpatterns += [ url(r'^f/upload$', group_views.flyimg_upload_api, name='flyimg_upload_api'), # 飞图上传 url(r'^f/list$', group_views.flyimg_upload_api, name='flyimg_list_api'), # 飞图列表 url(r'^f/detail$', group_views.flyimg_detail_api, name='flyimg_detail_api'), # 飞图详情 url(r'^f/comment/submit$', group_views.comment_submit_api, name='comment_submit_api'), # 飞图评论提交 url(r'^f/comment/list$', group_views.comment_submit_api, name='comment_list_api'), # 飞图评论列表 url(r'^f/thumbup/submit$', group_views.thumbup_submit_api, name='thumbup_submit_api'), # 飞图点赞提交 url(r'^f/thumbup/list$', group_views.thumbup_list_api, name='thumbup_list_api'), # 飞图点赞列表 url(r'^f/thumbup/cancel$', group_views.thumbup_cancel_api, name='thumbup_cancel_api'), # 飞图点赞取消 url(r'^f/price$', group_views.lensman_photo_price, name='lensman_photo_price'), # 摄影师照片价格获取 url(r'^f/bought$', group_views.lensman_photo_bought, name='lensman_photo_bought'), # 摄影师照片已购买 ] # 消息相关 urlpatterns += [ url(r'^msg/list$', message_views.message_list_api, name='message_list_api'), # 消息列表 url(r'^msg/(?P<msg_type>\w+)/list$', message_views.message_type_list_api, name='message_type_list_api'), # 分类消息列表 url(r'^msg/(?P<msg_type>\w+)/read$', message_views.message_type_read_api, name='message_type_read_api'), # 消息读取 url(r'^msg/(?P<msg_type>\w+)/delete$', message_views.message_type_delete_api, name='message_type_delete_api'), # 消息删除 ] # 控制器相关 urlpatterns += [ url(r'^uuid_init$', photo_views.uuid_init, name='uuid_init'), # 生成唯一标识 url(r'^uuid$', photo_views.uuid, name='uuid'), # 获取唯一标识 url(r'^photos/upload$', photo_views.upload_photo, name='upload_photo'), # 摄影师照片上传 # url(r'^photos/raw/upload$', photo_views.upload_raw_photo, name='upload_raw_photo'), # 摄影师高清照片上传 ] # 二维码相关 urlpatterns += [ url(r'^s/join$', photo_views.session_join_api, name='session_join_api'), # Session 加群 url(r'^p/(?P<photo>\w+)$', photo_views.photo_standard_api, name='photo_standard_api'), # standard thumbnail, available for free ] # 系统相关 urlpatterns += [ url(r'^op/upgrade$', op_views.upgrade_api, name='upgrade_api'), # APP 升级 url(r'^op/patch$', op_views.patch_api, name='patch_api'), # APP 补丁 url(r'^op/online$', op_views.online_api, name='online_api'), # 是否上线 url(r'^op/splash$', op_views.splash_api, name='splash_api'), # 启动页面 url(r'^op/feedback$', op_views.feedback_api, name='feedback_api'), # 用户反馈 url(r'^op/download$', op_views.download_api, name='download_api'), # 下载接口 ] # 地理位置相关 urlpatterns += [ url(r'^geo/submit$', geo_views.geo_submit_api, name='geo_submit_api'), # 地理位置信息提交 ] # 支付相关 urlpatterns += [ url(r'^wx/order_create$', pay_views.wx_order_create_api, name='wx_order_create_api'), # 订单创建 url(r'^wx/order_query$', pay_views.wx_order_query_api, name='wx_order_query_api'), # 订单查询补单 url(r'^wx/order_list$', pay_views.wx_order_list_api, name='wx_order_list_api'), # 订单列表 url(r'^wx/order_detail$', pay_views.wx_order_detail_api, name='wx_order_detail_api'), # 订单详情 url(r'^wx/notify_url$', pay_views.wx_notify_url_api, name='wx_notify_url_api'), # 支付异步通知回调地址 ] # 提现相关 urlpatterns += [ url(r'^wx/balance_withdraw$', pay_views.wx_balance_withdraw_api, name='wx_balance_withdraw_api'), # 余额提现: 企业付款/现金红包 ] # 微信授权相关 urlpatterns += [ url(r'^wx_oauth2$', wechat_views.wx_oauth2, name='wx_oauth2'), url(r'^base_redirect$', wechat_views.base_redirect, name='base_redirect'), url(r'^userinfo_redirect$', wechat_views.userinfo_redirect, name='userinfo_redirect'), ] # 微信分享相关 urlpatterns += [ url(r'^wx/jsapi_signature$', wechat_views.wx_jsapi_signature_api, name='wx_jsapi_signature_api'), # jsapi_signature ] # 首页相关 urlpatterns += [ url(r'^pai2/home$', group_views.pai2_home_api, name='pai2_home_api'), # 首页照片信息 url(r'^pai2/tginfo$', tourguidegroup_views.pai2_tginfo_api, name='pai2_tginfo_api'), # 首页旅行团信息 ] # Mini App urlpatterns += [ url(r'^mini/userinfo$', mini_views.get_userinfo_api, name='get_userinfo_api'), # 获取用户信息 ]